fix(listview): prevent table column layout shift on content change#37299
fix(listview): prevent table column layout shift on content change#37299massucattoj wants to merge 6 commits intoapache:masterfrom
Conversation
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #37299 +/- ##
===========================================
+ Coverage 0 66.49% +66.49%
===========================================
Files 0 668 +668
Lines 0 51265 +51265
Branches 0 5770 +5770
===========================================
+ Hits 0 34088 +34088
- Misses 0 15791 +15791
- Partials 0 1386 +1386
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Code Review Agent Run #87d86bActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
@massucattoj can you label the screenshots with before and after? |
|
🎪 Showtime deployed environment on GHA for 80056c1 • Environment: http://54.213.247.45:8080 (admin/admin) |
sure! done. |
|
🎪 Showtime deployed environment on GHA for 7269e68 • Environment: http://54.202.158.243:8080 (admin/admin) |
|
@massucattoj how did you define width for each column? Does each type of the column (owners for example) have the same width in every CRUD? Some CRUD views look weird, because we do not have a lot of columns - for example dashboard crud. It's harder to scan, because all of the info is on the right, and title is super far away. I am thinking maybe it should be other way round - max/fixed title, and the rest "fill in" the space (not based on the content, but space left), so that it's more balanced. wdyt @msyavuz @yousoph ? One more thing: |
I think it would look better for most CRUD views but if the title becomes multiline i am not sure. But that can be easily solved by a sufficient enough title column width and rest taking up the remaining space |
We have truncation implemented with "..." and details on hover, so it should be fine. From what I can see 360px could be a sweet spot for fixed title width |
|
Hey guys I address the changes requested by @kasiazjc now we have a fixed title width of 360px and the secondary columns fit the remaning space 🚀 |
Code Review Agent Run #e5e562Actionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
superset-frontend/packages/superset-ui-core/src/components/TableCollection/utils.tsx
Outdated
Show resolved
Hide resolved
|
AntD's size naming follows a pattern of repeating 'x' (xs, sm, md, lg, xl, xxl). Using 'xxxl' instead of '3xl' would align better with this convention for consistency across the codebase, as '3xl' deviates from the pattern. |
Code Review Agent Run #f9e4c6Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
alexandrusoare
left a comment
There was a problem hiding this comment.
Thank you for your contribution! One thing though, I see that we gave a fix width for some of the CRUD views, Chart, Dashboard and Dataset. Wondering if we should do the same for the Crud views for Users, Roles and Groups etc?

SUMMARY
Problem: The Name column in list tables (Dataset, Dashboard, Chart) was shifting horizontally when table content changed - either from filtering, pagination, or when the browser scrollbar appeared/disappeared.
Solution: Two root causes were addressed:
Browser scrollbar: Added scrollbar-gutter: stable to the HTML element so space is always reserved for the scrollbar, preventing layout shift when it appears/disappears.
Column width recalculation: Changed from tableLayout="auto" to tableLayout="fixed". With fixed layout, columns with explicit size get fixed pixel widths, while the Name column (without size) takes all remaining space. This prevents the table from recalculating column widths based on content.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before (Dashboard):


After (Dashboard):
Before (Charts):


After (Charts):
Before (Datasets):


After (Datasets):
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION