-
Notifications
You must be signed in to change notification settings - Fork 3
fix: allow to truncate tags #2809
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
base: main
Are you sure you want to change the base?
Conversation
Coverage Report for packages/react
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
🔍 Visual review for your branch is published 🔍Here are the links to: |
size-limit report 📦
|
dd69b3a to
06e051d
Compare
|
hi @rubenmoya the stabilizacion PR #2543 already includes the ellipisis in the tag components |
I see it also changes the
When the first tag has a long text, and the available width is small it does not show a single item. Edit: With the changes to the
|
06e051d to
424efbd
Compare


Description
We've got a report about a data table showing information that overlaps and makes it impossible to read, you can see it here:
Screenshots (if applicable)
I've wrapped the
OverflowListcomponent in a300pxdivwith a red border so we can see the overflow.Before:

After:

Implementation details
The were a few problems. The first one is that the
ValueDisplayrenderer fortagListis not using thefillprop, so any tags inside it won't try and fit the available content.The second problem was that in the
calculateVisibleItemCount, we were allowing to return no visible elements, but we don't want that, we want to show at least one of them, and that item should be truncated.Then we needed to make the
BaseTagtruncate the text, and add amin-w-0to avoid the overflowing.