Skip to content

Conversation

chriscollins3456
Copy link
Collaborator

With the recent changes to the home page where we got rid of that huge color block, I noticed we weren't properly handling long names but truncating them with an ellipses but they were just getting cut off. I fix this by adding an OverflowText component that's pretty bare bones right now but can be beefed out later for different use cases. This simply adds ellipses and shows a tooltip if text is too wide for its area. Still allows line breaks and what not.

Here's it in action on the home page:

image

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label May 5, 2025
Comment on lines +21 to +26
useEffect(() => {
const el = textRef.current;
if (el) {
setIsTruncated(el.scrollWidth > el.clientWidth);
}
}, [text]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we put this in a resize observer? Maybe not by default -- could impact performance, but option would be nice

}, [text]);

return (
<Tooltip2 title={isTruncated ? text : undefined}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we always using "Tooltip2" over regular tooltip? I think of Tooltip2 as more of a "structured tooltip". And then we should just make our regular Tooltip look like we want, i.e. with a white background and gray text

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah that's a good question we need to clear up. let's ask designers to get a final call here

Copy link

alwaysmeticulous bot commented May 5, 2025

🔴 Meticulous spotted visual differences in 135 of 1393 screens tested: view and approve differences detected.

Meticulous evaluated ~9 hours of user flows against your PR.

Last updated for commit 04c1b13. This comment will update as new commits are pushed.

@datahub-cyborg datahub-cyborg bot added the pending-submitter-response Issue/request has been reviewed but requires a response from the submitter label May 5, 2025
Copy link

codecov bot commented May 5, 2025

Codecov Report

Attention: Patch coverage is 55.71429% with 31 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...omponents/components/OverflowText/OverflowText.tsx 51.51% 16 Missing ⚠️
.../Incident/AcrylComponents/IncidentDrawerHeader.tsx 20.00% 4 Missing ⚠️
...-web-react/src/app/settingsV2/features/Feature.tsx 20.00% 4 Missing ⚠️
.../src/alchemy-components/components/Table/Table.tsx 33.33% 2 Missing ⚠️
.../app/entityV2/shared/versioning/VersionsDrawer.tsx 33.33% 2 Missing ⚠️
datahub-web-react/src/app/tags/ManageTags.tsx 33.33% 2 Missing ⚠️
...hemy-components/components/PageTitle/PageTitle.tsx 50.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (55.71%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

📢 Thoughts on this report? Let us know!

@chriscollins3456 chriscollins3456 merged commit a2b1667 into master May 6, 2025
34 of 38 checks passed
@chriscollins3456 chriscollins3456 deleted the cc--fix-title-overflow branch May 6, 2025 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-submitter-merge product PR or Issue related to the DataHub UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants