Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the DataView components to enhance their flexibility and visual consistency by adding support for secondary text in columns, customizable row actions (buttons and menus), and improved alignment options for both table and card views.
Key Changes:
- Added
secondaryTextandsecondaryRenderproperties to column definitions, enabling display of supplementary information beneath primary values - Introduced
rowActionsprop with support for action buttons and dropdown menus per row, replacing the previousitemMenupattern - Enhanced alignment capabilities with left/center/right options for columns and actions
- Refactored rendering logic to use new helper functions (
getColumnContent,getFooterContent) for consistent content normalization - Updated multiple payroll presentation components to leverage these new features
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
PayrollOverviewPresentation.tsx |
Refactored to use new DataView features: memoized employee map, simplified render functions returning primitives instead of JSX, added alignment props, and updated footer to use structured format |
PayrollListPresentation.tsx |
Converted from itemMenu to rowActions pattern with buttons and menu items, added secondary text for pay schedule display, memoized pay schedule names lookup |
PayrollConfigurationPresentation.tsx |
Updated to use secondaryRender for employee details, simplified column definitions by returning primitives, memoized employee map |
Tabs.module.scss |
Adjusted tab styling (removed border-bottom, updated font-weight from semibold to medium) |
Table.module.scss |
Changed default text alignment from left to inherit and removed last-child right alignment rule |
useDataView.ts |
Extended type definitions to support secondary text, row actions, and structured footer cells |
getFooterContent.ts |
New helper function to normalize footer cell content into structured format |
getColumnContent.ts |
New helper function to extract primary and secondary content from columns |
DataView.tsx |
Added rowActions prop and passed through to child components |
DataView.stories.tsx |
Added story demonstrating secondary text, updated existing stories to use new rowActions pattern |
DataTable.tsx |
Implemented rendering for secondary text, row actions, alignment, and footer with structured content |
DataTable.test.tsx |
Added tests for secondary text rendering, row actions with buttons, and alignment |
DataTable.module.scss |
New styles for cell/header/footer wrappers with alignment support and secondary text styling |
DataCards.tsx |
Implemented secondary text rendering, integrated row actions into card layout and menu |
DataCards.test.tsx |
Added test for secondary text rendering |
DataCards.module.scss |
Added styles for primary/secondary content, footer secondary text, and menu wrapper |
DataViewActions.tsx |
New component to render action buttons and menus in row or column orientation |
DataViewActions.module.scss |
Styles for row and column action layouts |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss
Outdated
Show resolved
Hide resolved
src/components/Common/DataView/DataActions/DataViewActions.module.scss
Outdated
Show resolved
Hide resolved
src/components/Common/DataView/DataActions/DataViewActions.module.scss
Outdated
Show resolved
Hide resolved
serikjensen
reviewed
Dec 19, 2025
Member
serikjensen
left a comment
There was a problem hiding this comment.
Dropped a comment in slack, we may want to figure out how to navigate the primary and secondary content items. we're going to pair and discuss early next week
…tional text components
a676695 to
70b3c04
Compare
Contributor
|
Rebased since this was getting a bit stale |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to the
DataViewcomponents, focusing on enhanced support for secondary text in columns, customizable row actions (buttons and menus), and improved alignment and styling for both tables and card views. These changes provide a more flexible and consistent UI for displaying tabular and card-based data, and are well-covered by new and updated tests.Key improvements include:
Secondary Text & Content Rendering
secondaryTextin column definitions for bothDataCardsandDataTable, allowing columns to display supplementary information beneath the primary value. This is reflected in both the UI and the test data. [1] [2] [3]Alignment & Styling Enhancements
Testing Improvements
DataCardsandDataTableto verify rendering of secondary text, row actions, and alignment features. [1] [2] [3]Storybook/Data Updates
These changes make the
DataViewcomponents more robust, flexible, and visually consistent, supporting new use cases and improving the overall developer and user experience.Screenshots
Before
After