Skip to content

fix(listview): prevent table column layout shift on content change#37299

Open
massucattoj wants to merge 6 commits intoapache:masterfrom
massucattoj:fix/table-column-layout-shift
Open

fix(listview): prevent table column layout shift on content change#37299
massucattoj wants to merge 6 commits intoapache:masterfrom
massucattoj:fix/table-column-layout-shift

Conversation

@massucattoj
Copy link
Contributor

@massucattoj massucattoj commented Jan 21, 2026

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):
Screenshot 2026-01-20 at 21 50 21
After (Dashboard):
Screenshot 2026-02-11 at 22 04 38

Before (Charts):
Screenshot 2026-01-20 at 21 50 33
After (Charts):
Screenshot 2026-02-11 at 22 05 00

Before (Datasets):
Screenshot 2026-01-20 at 21 50 44
After (Datasets):
Screenshot 2026-02-11 at 22 05 16

TESTING INSTRUCTIONS

  1. Navigate to the Datasets list page
  2. Apply a filter (e.g., search by name or filter by database)
  3. Observe that the table columns no longer shift when the filtered results load
  4. Navigate between pages with different row counts
  5. Verify columns remain stable when scrollbar appears/disappears

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@netlify
Copy link

netlify bot commented Jan 21, 2026

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 66a1e9d
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/698d22527374790007a11860
😎 Deploy Preview https://deploy-preview-37299--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.49%. Comparing base (3fba967) to head (66a1e9d).
⚠️ Report is 321 commits behind head on master.

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     
Flag Coverage Δ
hive 41.50% <ø> (?)
mysql 64.59% <ø> (?)
postgres 64.67% <ø> (?)
presto 41.52% <ø> (?)
python 66.46% <ø> (?)
sqlite 64.26% <ø> (?)
unit 100.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@massucattoj massucattoj marked this pull request as ready for review January 21, 2026 00:56
@dosubot dosubot bot added the listview Namespace | Anything related to lists, such as Dashboards, Charts, Datasets, etc. label Jan 21, 2026
@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 21, 2026

Code Review Agent Run #87d86b

Actionable Suggestions - 0
Review Details
  • Files reviewed - 3 · Commit Range: 80056c1..80056c1
    • superset-frontend/packages/superset-ui-core/src/components/TableCollection/index.tsx
    • superset-frontend/src/pages/DatasetList/index.tsx
    • superset/templates/superset/spa.html
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@sadpandajoe sadpandajoe added the 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR label Jan 21, 2026
@sadpandajoe
Copy link
Member

@massucattoj can you label the screenshots with before and after?

@github-actions github-actions bot added 🎪 80056c1 🚦 building Environment 80056c1 status: building 🎪 80056c1 📅 2026-01-21T18-55 Environment 80056c1 created at 2026-01-21T18-55 🎪 80056c1 🤡 sadpandajoe Environment 80056c1 requested by sadpandajoe 🎪 ⌛ 48h Environment expires after 48 hours (default) and removed 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR labels Jan 21, 2026
@github-actions
Copy link
Contributor

🎪 Showtime is building environment on GHA for 80056c1

@github-actions github-actions bot added 🎪 80056c1 🚦 deploying Environment 80056c1 status: deploying 🎪 80056c1 🚦 running Environment 80056c1 status: running 🎪 🎯 80056c1 Active environment pointer - 80056c1 is receiving traffic 🎪 80056c1 🌐 54.213.247.45:8080 Environment 80056c1 URL: http://54.213.247.45:8080 (click to visit) and removed 🎪 80056c1 🚦 building Environment 80056c1 status: building 🎪 80056c1 🚦 deploying Environment 80056c1 status: deploying 🎪 80056c1 🚦 running Environment 80056c1 status: running 🎪 🎯 80056c1 Active environment pointer - 80056c1 is receiving traffic labels Jan 21, 2026
@github-actions
Copy link
Contributor

🎪 Showtime deployed environment on GHA for 80056c1

Environment: http://54.213.247.45:8080 (admin/admin)
Lifetime: 48h auto-cleanup
Updates: New commits create fresh environments automatically

@massucattoj
Copy link
Contributor Author

@massucattoj can you label the screenshots with before and after?

sure! done.

@rusackas rusackas requested a review from msyavuz January 22, 2026 04:33
Copy link
Member

@msyavuz msyavuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kasiazjc might have an opinion on this one but this looks a bit off to me. Especially the favourites column

@github-actions github-actions bot added the 🎪 ⌛ 48h Environment expires after 48 hours (default) label Jan 29, 2026
@github-actions
Copy link
Contributor

🎪 Showtime is building environment on GHA for 7269e68

@github-actions github-actions bot added 🎪 7269e68 🚦 deploying Environment 7269e68 status: deploying 🎪 7269e68 🚦 running Environment 7269e68 status: running 🎪 🎯 7269e68 Active environment pointer - 7269e68 is receiving traffic 🎪 7269e68 🌐 54.202.158.243:8080 Environment 7269e68 URL: http://54.202.158.243:8080 (click to visit) and removed 🎪 7269e68 🚦 building Environment 7269e68 status: building 🎪 7269e68 🚦 deploying Environment 7269e68 status: deploying 🎪 7269e68 🚦 running Environment 7269e68 status: running 🎪 🎯 7269e68 Active environment pointer - 7269e68 is receiving traffic labels Jan 29, 2026
@github-actions
Copy link
Contributor

🎪 Showtime deployed environment on GHA for 7269e68

Environment: http://54.202.158.243:8080 (admin/admin)
Lifetime: 48h auto-cleanup
Updates: New commits create fresh environments automatically

@msyavuz msyavuz added the requires:design-review Requires input/approval from a Designer label Jan 30, 2026
@kasiazjc
Copy link
Contributor

kasiazjc commented Jan 30, 2026

@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 in datasets first column that is empty should be removed (probably was for favorites, but we do not have favorites in datasets)
image

@github-actions github-actions bot removed 🎪 7269e68 🤡 yousoph Environment 7269e68 requested by yousoph 🎪 7269e68 🌐 54.202.158.243:8080 Environment 7269e68 URL: http://54.202.158.243:8080 (click to visit) 🎪 7269e68 📅 2026-01-29T21-52 Environment 7269e68 created at 2026-01-29T21-52 🎪 7269e68 🚦 running Environment 7269e68 status: running labels Feb 1, 2026
@msyavuz
Copy link
Member

msyavuz commented Feb 2, 2026

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 ?

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

@kasiazjc
Copy link
Contributor

kasiazjc commented Feb 2, 2026

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 ?

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

@massucattoj
Copy link
Contributor Author

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 🚀

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Feb 12, 2026

Code Review Agent Run #e5e562

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset-frontend/packages/superset-ui-core/src/components/TableCollection/index.tsx - 1
    • Ineffective tableLayout prop · Line 299-299
      The tableLayout prop is set to "auto", but since scroll.x is present, Ant Design automatically overrides this to "fixed". This makes the "auto" setting ineffective and potentially confusing for maintainers. Consider changing it to "fixed" to align with the actual behavior.
      Code suggestion
       @@ -299,1 +299,1 @@
      -      tableLayout="auto"
      +      tableLayout="fixed"
Review Details
  • Files reviewed - 4 · Commit Range: 7269e68..bef9828
    • superset-frontend/packages/superset-ui-core/src/components/TableCollection/utils.tsx
    • superset-frontend/src/pages/ChartList/index.tsx
    • superset-frontend/src/pages/DashboardList/index.tsx
    • superset-frontend/src/pages/DatasetList/index.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@bito-code-review
Copy link
Contributor

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.

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Feb 12, 2026

Code Review Agent Run #f9e4c6

Actionable Suggestions - 0
Review Details
  • Files reviewed - 4 · Commit Range: bef9828..fae1cd6
    • superset-frontend/packages/superset-ui-core/src/components/TableCollection/utils.tsx
    • superset-frontend/src/pages/ChartList/index.tsx
    • superset-frontend/src/pages/DashboardList/index.tsx
    • superset-frontend/src/pages/DatasetList/index.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

Copy link
Contributor

@alexandrusoare alexandrusoare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

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

Labels

listview Namespace | Anything related to lists, such as Dashboards, Charts, Datasets, etc. packages requires:design-review Requires input/approval from a Designer 🎪 🔒 showtime-blocked size/S 🎪 ⌛ 48h Environment expires after 48 hours (default)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants