Skip to content

fix(metadata-bar): add max-width to text for proper ellipsis truncation#42237

Open
prathamesh04 wants to merge 1 commit into
apache:masterfrom
prathamesh04:fix/timestamp-overflow-meta-cards
Open

fix(metadata-bar): add max-width to text for proper ellipsis truncation#42237
prathamesh04 wants to merge 1 commit into
apache:masterfrom
prathamesh04:fix/timestamp-overflow-meta-cards

Conversation

@prathamesh04

@prathamesh04 prathamesh04 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR fixes text overflow in the MetadataBar component where long localized timestamps (e.g. German Geändert vor 3 Stunden und 42 Minuten) were being clipped without showing an ellipsis.

Problem

The .metadata-text span in the MetadataBar component had overflow: hidden and text-overflow: ellipsis set, but lacked an explicit max-width constraint. In a flex layout context, text-overflow: ellipsis requires a definite width on the element itself to work reliably. Without it, the text was clipped by the parent max-width but the ellipsis was not applied.

Fix

Added max-width: 150px to the .metadata-text span. This gives the text element a definite width constraint, ensuring text-overflow: ellipsis works properly in the flex layout.

After

Screenshot from 2026-07-21 13-35-46

Testing

All 21 existing MetadataBar tests pass. The fix is a single CSS property addition with no behavioral changes.

Closes #40460

When localized timestamps (e.g. German 'Geändert vor 3 Stunden und 42
Minuten') exceed the available horizontal space in the metadata bar,
the text was being clipped without ellipsis because the text span
 lacked an explicit max-width constraint.

Added max-width: TEXT_MAX_WIDTH (150px) to the .metadata-text span
so text-overflow: ellipsis works reliably in the flex layout context.

Closes apache#40460
@dosubot dosubot Bot added the change:frontend Requires changing the frontend label Jul 20, 2026
@bito-code-review

bito-code-review Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #db0b3a

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

@prathamesh04

Copy link
Copy Markdown
Contributor Author

cc @michael-s-molina @geido @kgabryje — This is a small CSS fix for #40460. All existing MetadataBar tests pass. Would appreciate a review when you have a chance!

@netlify

netlify Bot commented Jul 20, 2026

Copy link
Copy Markdown

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit eabaae2
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a5ddcbd9d181a0008443dce
😎 Deploy Preview https://deploy-preview-42237--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.13%. Comparing base (bef03fb) to head (eabaae2).
⚠️ Report is 58 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #42237      +/-   ##
==========================================
- Coverage   65.13%   65.13%   -0.01%     
==========================================
  Files        2753     2753              
  Lines      154584   154584              
  Branches    35463    35463              
==========================================
- Hits       100695   100689       -6     
- Misses      51975    51981       +6     
  Partials     1914     1914              
Flag Coverage Δ
javascript 70.72% <ø> (-0.01%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 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.

@sadpandajoe

Copy link
Copy Markdown
Member

@prathamesh04 mind adding before and after screenshots to your PR description?

@prathamesh04

prathamesh04 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@sadpandajoe I have added the before/after section in the PR description.

@prathamesh04

Copy link
Copy Markdown
Contributor Author

Hi @michael-s-molina @geido @kgabryje — I've added the before/after screenshots as requested by @sadpandajoe. All existing MetadataBar tests pass. Could you take a look when you get a chance? Thanks!

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 packages size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Long "Modified at" timestamps overflow meta cards

2 participants