-
Notifications
You must be signed in to change notification settings - Fork 4.6k
DataViews: implement groupBy for list layout
#71548
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 following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +126 B (+0.01%) Total Size: 1.93 MB
ℹ️ View Unchanged
|
|
Nice. This looks good to me! |
| groups.get( groupName )?.push( item ); | ||
| return groups; | ||
| }, new Map< string, typeof data >() ) | ||
| : null; |
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.
Don't you think there's some internal utility or something like that here. Isn't this code duplicated in all layouts?
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.
Extracted at 2a948ed
382d02f to
2a948ed
Compare
|
Flaky tests detected in 2a948ed. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17588755316
|
Co-authored-by: oandregal <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: jameskoster <[email protected]>
Co-authored-by: oandregal <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: jameskoster <[email protected]>
Part of #57967
What?
Adds support to rendering the item list grouped by a field in the list layout.
Screen.Recording.2025-09-08.at.17.05.40.mov
Why?
It follows-up work to support the same in grid and table.
How?
Update the list layout to consider groupBy information, if present.
Testing Instructions
Open the storybook (
npm run storybook:dev), and visit the story "DataViews > DataViews > Group by Layout".