-
Notifications
You must be signed in to change notification settings - Fork 84
Implement sticky column headers and action bars for "full-page" tables #6813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Summary
Implemented sticky column headers and action bars for full-page tables using Ant Design's sticky table configuration. Made page headers non-sticky on affected pages for compatibility with the new sticky table elements.
Key changes:
- Added
sticky: { offsetHeader: 40 }config to four table hooks to enable sticky headers - Made action bars sticky using Tailwind classes (
sticky -top-6 z-10 bg-white py-4) - Disabled sticky page headers (
isSticky={false}) on four pages - Switched from FixedLayout to Layout on systems and action center pages
- Added
containerPropsto LinkCell and ListExpandableCell for width constraints
Issues found:
- LinkCell.tsx: Missing Flex import and using
divinstead of Flex component (violates style guide) - Two page files: Using inline
styleattributes instead of Tailwind classes (violates style guide)
Confidence Score: 3/5
- Safe to merge after fixing the missing Flex import in LinkCell.tsx, which will cause runtime errors
- The syntax error in LinkCell.tsx (missing Flex import for the suggested refactor) needs to be fixed. The inline style violations are style preferences that don't affect functionality. The core sticky header implementation is sound and consistent across all tables.
- Pay close attention to
clients/admin-ui/src/features/common/table/cells/LinkCell.tsx- it has style guide violations that should be addressed
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| clients/admin-ui/src/features/common/table/cells/LinkCell.tsx | 2/5 | Added containerProps support but introduced issues: missing Flex import and using div instead of Flex component |
| clients/admin-ui/src/pages/settings/custom-fields/index.tsx | 4/5 | Disabled sticky page header and adjusted padding, but uses inline style instead of Tailwind |
| clients/admin-ui/src/pages/systems/index.tsx | 4/5 | Switched layouts, disabled sticky header, adjusted button positioning, but uses inline style |
Sequence Diagram
sequenceDiagram
participant Page as Page Component
participant PageHeader as PageHeader
participant Table as Table Component
participant Hook as useAntTable Hook
participant AntTable as Ant Design Table
Page->>PageHeader: Render with isSticky=false
Note over PageHeader: Page header non-sticky<br/>for compatibility
Page->>Table: Render table component
Table->>Hook: Initialize with sticky config
Note over Hook: sticky: {<br/> offsetHeader: 40<br/>}
Table->>Table: Render action bar
Note over Table: Action bar with classes:<br/>sticky -top-6 z-10<br/>bg-white py-4
Table->>AntTable: Pass tableProps with sticky config
AntTable->>AntTable: Apply sticky headers
Note over AntTable: Column headers stick<br/>40px below viewport top
Note over Page,AntTable: User scrolls down
PageHeader->>PageHeader: Scrolls off screen
Table->>Table: Action bar sticks to top
AntTable->>AntTable: Headers stick below action bar
14 files reviewed, 4 comments
…b.com/ethyca/fides into jpople/eng-1489/sticky-column-headers
vcruces
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great! I just noticed that when scrolling through the System Inventory table, the top border of the table header disappears. But is that just a detail, or perhaps just a visual effect?
Screen.Recording.2025-10-22.at.11.28.23.mov
| .scrollIntoView() | ||
| .should("be.visible"); | ||
| cy.getByTestId("discovery-status-icon-alert").realHover(); | ||
| cy.getByTestId("discovery-status-icon-alert").should("exist"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scrollIntoView was causing issues here because the sticky headers break horizontal scrolling somehow. Just streamlined this test, @gilluminate and I thought it was fine to check that the icon exists without needing to check the tooltip showing on hover.
Ticket 1489
Description Of Changes
Changes column headers and action bars on some tables (specifically those using the new useAntTable hooks that are the primary element on their page) to be sticky. Also makes page headers on applicable pages nonsticky for compatibility.
Steps to Confirm
On the following tables, verify that page headers and action bars stick when scrolling:
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works