Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag - Text truncation for overflow fix #2655

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

dchyun
Copy link
Contributor

@dchyun dchyun commented Jan 17, 2025

📌 Summary

This PR examines the overflow issue present when text wraps to > 3 lines, and solves it by forcing all text to be one line, and have a character limit of 20 characters before being truncated.

🛠️ Detailed description

📸 Screenshots

🔗 External links

Jira ticket: HDS-4317
Figma file: [if it applies]


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

Copy link

vercel bot commented Jan 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
hds-showcase ✅ Ready (Inspect) Visit Preview Jan 22, 2025 1:50pm
hds-website ✅ Ready (Inspect) Visit Preview Jan 22, 2025 1:50pm

Copy link
Contributor

@majedelass majedelass left a comment

Choose a reason for hiding this comment

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

This is looking great, although I did find an interesting "bug"
image

The tooltip is still there even if the text is fully revealed. Wonder if there is a way to fix this?

UPDATE: It looks like something that was once truncated, but then isn't will have a tooltip. We should also check screen reader behavior. Does the text get read out twice or just once? I think we can loop in the entire team for A11Y

@dchyun
Copy link
Contributor Author

dchyun commented Jan 21, 2025

This is looking great, although I did find an interesting "bug" image

The tooltip is still there even if the text is fully revealed. Wonder if there is a way to fix this?

Did you notice this after doing some resizing of the page, or on load? One open issue with the fix is that the tooltip will be added if the text goes from not cut off to cut off on a resize, but not removed if the text goes from cut off to shown.

I figure this isn't a use case that will come up often as users aren't usually resizing their browser back and forth, but will see if I can find some fix.

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

Successfully merging this pull request may close these issues.

3 participants