Skip to content

feat(Table): add composable sticky footer - #12645

Open
gabipodolnikova wants to merge 1 commit into
patternfly:mainfrom
gabipodolnikova:fix/glass-sticky-table-sections
Open

feat(Table): add composable sticky footer#12645
gabipodolnikova wants to merge 1 commit into
patternfly:mainfrom
gabipodolnikova:fix/glass-sticky-table-sections

Conversation

@gabipodolnikova

@gabipodolnikova gabipodolnikova commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

What: Adds support for composable sticky table footers.

Jira: PF-3996

  • Adds a composable Tfoot component for semantic table footer rows.
  • Adds the isStickyFooter prop to Table.
  • Exports Tfoot from @patternfly/react-table.
  • Adds documentation and a sticky footer example.
  • Adds unit tests for Tfoot and sticky footer behavior.

Validation:

  • yarn jest packages/react-table/src/components/Table/__tests__/Table.test.tsx packages/react-table/src/components/Table/__tests__/Tfoot.test.tsx --runInBand
  • yarn tsc --build packages/tsconfig.json --pretty false

Both checks passed.

Additional issues: None.

Summary by CodeRabbit

  • New Features

    • Added support for sticky table footers through the isStickyFooter property.
    • Added a reusable table footer component with ref and custom property support.
    • Exported the table footer component for public use.
  • Documentation

    • Added a sticky footer example and documented the new table footer component.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: a7116847-c09f-4fc7-bb29-ef9f42776fbd

📥 Commits

Reviewing files that changed from the base of the PR and between b73e9dd and fbd1a8c.

📒 Files selected for processing (7)
  • packages/react-table/src/components/Table/Table.tsx
  • packages/react-table/src/components/Table/Tfoot.tsx
  • packages/react-table/src/components/Table/__tests__/Table.test.tsx
  • packages/react-table/src/components/Table/__tests__/Tfoot.test.tsx
  • packages/react-table/src/components/Table/examples/Table.md
  • packages/react-table/src/components/Table/examples/TableStickyFooter.tsx
  • packages/react-table/src/components/Table/index.ts

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


Walkthrough

Adds sticky footer support to Table, introduces and exports Tfoot, adds tests, and documents the feature with a scrollable table example.

Changes

Sticky footer support

Layer / File(s) Summary
Table sticky footer behavior
packages/react-table/src/components/Table/Table.tsx, packages/react-table/src/components/Table/__tests__/Table.test.tsx
Adds the optional isStickyFooter prop, defaults it to false, applies the stickyFooter modifier when enabled, and tests both states.
Semantic Tfoot component
packages/react-table/src/components/Table/Tfoot.tsx, packages/react-table/src/components/Table/__tests__/Tfoot.test.tsx, packages/react-table/src/components/Table/index.ts
Adds a styled <tfoot> component with ref and prop forwarding, tests its rendering and forwarding behavior, and exports it publicly.
Sticky footer example and documentation
packages/react-table/src/components/Table/examples/Table.md, packages/react-table/src/components/Table/examples/TableStickyFooter.tsx
Documents Tfoot and isStickyFooter and adds a scrollable table example with a total row.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to fbd1a

This change adds opt-in sticky table footers with a semantic footer component, documentation, and examples. Existing behavior remains unchanged by default, and no current merge-blocking risk remains.

Sequence Diagram(s)

sequenceDiagram
  participant TableStickyFooter
  participant InnerScrollContainer
  participant Table
  participant Tfoot
  TableStickyFooter->>InnerScrollContainer: Render fixed-height scroll container
  TableStickyFooter->>Table: Enable isStickyFooter
  TableStickyFooter->>Tfoot: Render total row
  Table->>Table: Apply stickyFooter modifier
  Tfoot->>Tfoot: Render styled tfoot element
Loading

Suggested reviewers: thatblindgeye

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding composable sticky footer support to the Table component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 6…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant