Skip to content

fix: resolve dashboard card layout broken by long translations in Russian locale#27509

Open
himanshu748 wants to merge 2 commits intoopen-metadata:mainfrom
himanshu748:fix/dashboard-card-layout-russian
Open

fix: resolve dashboard card layout broken by long translations in Russian locale#27509
himanshu748 wants to merge 2 commits intoopen-metadata:mainfrom
himanshu748:fix/dashboard-card-layout-russian

Conversation

@himanshu748
Copy link
Copy Markdown

Summary

In the Russian locale, the dashboard entity card label (Типы объектов / Дашборды) is longer than the fixed maximum width of the header container (148px). Since the text rendering elements forced whitespace on a single unbroken line (whitespace-nowrap), the text was spilling outside the layout boundaries, breaking the card's alignment and overlapping adjacent UI elements.

Root Cause

Typography.Text and span elements rendering the labels within ExtraInfoLabel and ExtraInfoLink components (/utils/DataAssetsHeader.utils.tsx) lacked proper text wrapping and truncation methods. The parent container had a whitespace-nowrap utility class, breaking the layout limits globally.

Fix

  • Removed the whitespace-nowrap class from the parent flex container in ExtraInfoLabel.
  • Replaced the standard <span className="extra-info-label-heading">{label}</span> elements with Ant Design Component <Typography.Text className="extra-info-label-heading" ellipsis={{ tooltip: true }}>{label}</Typography.Text> in both ExtraInfoLabel and ExtraInfoLink.
  • This safely constrains long text to the 148px boundary and gracefully presents an ellipsis when overlapping, showing the full translated translation in the tooltip.

Testing

  • Tested UI component utilities locally to verify compilation success.
  • Changes leverage strictly Ant Design components, guaranteeing default UI alignments and consistent text truncation.

Fixes #24699

AI Disclosure

This contribution was developed with the assistance of Antigravity, an AI coding assistant by Google DeepMind.

…sian locale

Replaced 'whitespace-nowrap' and plain 'span' elements with Ant Design's
'Typography.Text' using 'ellipsis={{ tooltip: true }}' in the ExtraInfoLabel
and ExtraInfoLink components. This cleanly truncates long translated labels
(e.g., 'Типы объектов / Дашборды'), displaying an ellipsis instead of pushing
the flex boundaries and breaking the dashboard card layout.

Fixes open-metadata#24699
@himanshu748 himanshu748 requested a review from a team as a code owner April 18, 2026 07:43
Copilot AI review requested due to automatic review settings April 18, 2026 07:43
@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the dashboard entity header/card layout breaking in the Russian locale by preventing long translated labels from overflowing the fixed-width extra-info header area.

Changes:

  • Removed whitespace-nowrap from the ExtraInfoLabel wrapper so the container no longer forces a single unbroken line.
  • Switched label rendering in ExtraInfoLabel and ExtraInfoLink from plain <span> to Typography.Text with ellipsis={{ tooltip: true }} for truncation + tooltip.

<span className="extra-info-label-heading m-r-xss">{label}</span>
<Typography.Text
className="extra-info-label-heading m-r-xss"
ellipsis={{ tooltip: true }}>
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

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

ExtraInfoLink now applies ellipsis={{ tooltip: true }} to the label unconditionally, even when the ellipsis prop is false. This makes the prop’s behavior inconsistent (it currently only controls adding w-48) and can unexpectedly truncate labels in callers that didn’t opt into ellipsis. Consider applying the label ellipsis conditionally based on the ellipsis prop (or rename/remove the prop if the intent is to always truncate labels).

Suggested change
ellipsis={{ tooltip: true }}>
ellipsis={ellipsis ? { tooltip: true } : false}>

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot
Copy link
Copy Markdown

gitar-bot bot commented Apr 18, 2026

Code Review ✅ Approved

Dashboard card layout is now preserved during long Russian translations by applying overflow-wrap and text-ellipsis styling. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken Dashboard Card Layout in Russian Locale

2 participants