fix: resolve dashboard card layout broken by long translations in Russian locale#27509
fix: resolve dashboard card layout broken by long translations in Russian locale#27509himanshu748 wants to merge 2 commits intoopen-metadata:mainfrom
Conversation
…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
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
There was a problem hiding this comment.
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-nowrapfrom theExtraInfoLabelwrapper so the container no longer forces a single unbroken line. - Switched label rendering in
ExtraInfoLabelandExtraInfoLinkfrom plain<span>toTypography.Textwithellipsis={{ 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 }}> |
There was a problem hiding this comment.
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).
| ellipsis={{ tooltip: true }}> | |
| ellipsis={ellipsis ? { tooltip: true } : false}> |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ ApprovedDashboard card layout is now preserved during long Russian translations by applying overflow-wrap and text-ellipsis styling. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
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.Textandspanelements rendering the labels withinExtraInfoLabelandExtraInfoLinkcomponents (/utils/DataAssetsHeader.utils.tsx) lacked proper text wrapping and truncation methods. The parent container had awhitespace-nowraputility class, breaking the layout limits globally.Fix
whitespace-nowrapclass from the parent flex container inExtraInfoLabel.<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 bothExtraInfoLabelandExtraInfoLink.148pxboundary and gracefully presents an ellipsis when overlapping, showing the full translated translation in the tooltip.Testing
Fixes #24699
AI Disclosure
This contribution was developed with the assistance of Antigravity, an AI coding assistant by Google DeepMind.