Skip to content

fix(list-view-card): truncate long descriptions and surface full text…#40500

Open
crimsondhaks wants to merge 1 commit into
apache:masterfrom
crimsondhaks:fix/list-view-card-description-overflow
Open

fix(list-view-card): truncate long descriptions and surface full text…#40500
crimsondhaks wants to merge 1 commit into
apache:masterfrom
crimsondhaks:fix/list-view-card-description-overflow

Conversation

@crimsondhaks
Copy link
Copy Markdown

@crimsondhaks crimsondhaks commented May 28, 2026

hey @sfirke, sorry, redoing the description + adding screenshots. Done reading the wiki link.

what's broken (#40460)

long localized "Modified at" strings (e.g. german) wrap or get clipped on ListViewCard. title already handles overflow with ellipsis + tooltip, description doesn't.

fix

one file: superset-frontend/packages/superset-ui-core/src/components/ListViewCard/index.tsx
css: overflow hidden / ellipsis / nowrap on .ant-card-meta-description
wrapped description in the existing Tooltip so hover shows full text

no prop changes, consumers untouched.

tested in storybook

no full superset deployment on my side. ran npm run storybook from superset-frontend/, opened Interactive List View Card, set viewport to Small mobile (P), pasted the german string from the issue into description.

before — description wraps to 2 lines, in real cards with fixed height it gets clipped:

image

after + hover — single line with ellipsis, tooltip on hover shows the full string:

image

happy to verify in a real backend run if you'd prefer that. existing ListViewCard.test.tsx still passes.

… via tooltip

Long localized strings such as 'Geändert vor ungefähr einer Stunde und siebenundzwanzig Minuten' wrap onto multiple lines or get clipped on dashboard/chart/saved-query/tag list cards because the description prop is passed straight through to AntD's Card.Meta with no overflow handling, while the title and titleRight elements in the same component already have ellipsis + tooltip patterns.

Add overflow/ellipsis CSS for .ant-card-meta-description on the styled card and wrap the description in the existing Tooltip component so the full localized text remains accessible on hover. No prop signature changes.

Fixes apache#40460
@dosubot dosubot Bot added change:frontend Requires changing the frontend listview Namespace | Anything related to lists, such as Dashboards, Charts, Datasets, etc. labels May 28, 2026
@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review Bot commented May 28, 2026

Code Review Agent Run #9f1850

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: fb20802..fb20802
    • superset-frontend/packages/superset-ui-core/src/components/ListViewCard/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

@sfirke
Copy link
Copy Markdown
Member

sfirke commented May 28, 2026

Thanks for this fix @crimsondhaks ! Please see this expectations checklist for new contributors: https://github.com/apache/superset/wiki/New-Contributor-Welcome-&-Expectations In particular, could you include before/after screenshots and add some human-written text to your PR description? Currently it seems like it was written completely by AI.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 64.17%. Comparing base (c73106b) to head (fb20802).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
...rset-ui-core/src/components/ListViewCard/index.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #40500      +/-   ##
==========================================
- Coverage   64.17%   64.17%   -0.01%     
==========================================
  Files        2592     2592              
  Lines      139299   139301       +2     
  Branches    32347    32349       +2     
==========================================
+ Hits        89395    89396       +1     
- Misses      48367    48368       +1     
  Partials     1537     1537              
Flag Coverage Δ
javascript 67.33% <50.00%> (-0.01%) ⬇️

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.

@rusackas
Copy link
Copy Markdown
Member

"Modified at" strings are pretty important, to a lot of users. You mention they get wrapped or cut off, but which is it? If they wrap, I'm OK with that. If they're cut off, I'd like to see them wrap. Truncating may be cleaner looking, but I'm a bit worried about losing critical info that verifies the freshness/truth of the data displayed. If the card needs to be redesigned a bit (cc @kasiazjc) I'm even open to that.

It'd be good to see the before/after images in the product, if it's possible to do so. I'll spin up an ephemeral test env here so you can do so if you're willing.

@rusackas rusackas added the 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR label May 28, 2026
@github-actions github-actions Bot added 🎪 fb20802 🚦 building Environment fb20802 status: building 🎪 fb20802 📅 2026-05-28T21-22 Environment fb20802 created at 2026-05-28T21-22 🎪 fb20802 🤡 rusackas Environment fb20802 requested by rusackas 🎪 ⌛ 48h Environment expires after 48 hours (default) and removed 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR labels May 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🎪 Showtime is building environment on GHA for fb20802

@rusackas rusackas removed the 🎪 ⌛ 48h Environment expires after 48 hours (default) label May 28, 2026
@github-actions github-actions Bot added 🎪 fb20802 🚦 deploying Environment fb20802 status: deploying 🎪 fb20802 🚦 running Environment fb20802 status: running 🎪 🎯 fb20802 Active environment pointer - fb20802 is receiving traffic 🎪 fb20802 🌐 184.32.244.27:8080 Environment fb20802 URL: http://184.32.244.27:8080 (click to visit) and removed 🎪 fb20802 🚦 building Environment fb20802 status: building 🎪 fb20802 🚦 deploying Environment fb20802 status: deploying 🎪 fb20802 🚦 running Environment fb20802 status: running 🎪 🎯 fb20802 Active environment pointer - fb20802 is receiving traffic labels May 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🎪 Showtime deployed environment on GHA for fb20802

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

@crimsondhaks
Copy link
Copy Markdown
Author

yeah "cut off" was my bad , it's actually clipped by the card, not wrapped.

so it's truncate + tooltip (what i did, but no hover on touch) vs just letting it wrap (always shows full text, costs a little height).

since you're ok with wrapping and don't want the timestamp hidden, happy to switch to wrapping — white-space: normal + making sure the card gives it room instead of clipping. want me to go that way, or wait for @kasiazjc?

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

Labels

change:frontend Requires changing the frontend 🎪 fb20802 🚦 running Environment fb20802 status: running 🎪 fb20802 🤡 rusackas Environment fb20802 requested by rusackas 🎪 fb20802 🌐 184.32.244.27:8080 Environment fb20802 URL: http://184.32.244.27:8080 (click to visit) 🎪 fb20802 📅 2026-05-28T21-22 Environment fb20802 created at 2026-05-28T21-22 listview Namespace | Anything related to lists, such as Dashboards, Charts, Datasets, etc. packages size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Long "Modified at" timestamps overflow meta cards

3 participants