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

fix(tag): update styles to truncate text content to one line #1534

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

pheggeseth
Copy link
Contributor

Summary

Very long text within a Tag overflows the container.

The .tagCell element was lacking the CSS necessary for the browser to derive an element width, thereby letting the element shrink its size to fit within its inline-grid parent. I've added a min-width declaration which lets the element grow/shrink as necessary to fill but not overflow its parent grid.

After that, truncating the text content overflow in the .tagContent element (which is rendered within .tagCell) can happen by adding the usual CSS.

Screenshots (if appropriate):

Before:
Screenshot 2025-01-30 at 11 24 48 AM

After:
Screenshot 2025-01-30 at 11 31 00 AM

Testing approaches

@pheggeseth pheggeseth requested review from antonio-darkly and a team as code owners January 30, 2025 18:22
Copy link

changeset-bot bot commented Jan 30, 2025

🦋 Changeset detected

Latest commit: dc51a5b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@launchpad-ui/tag Patch
@launchpad-ui/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Size Change: +19 B (0%)

Total Size: 539 kB

Filename Size Change
packages/tag/dist/index.es.js 2.85 kB -4 B (-0.14%)
packages/tag/dist/index.js 2.93 kB -4 B (-0.14%)
packages/tag/dist/style.css 770 B +27 B (+3.63%)
ℹ️ View Unchanged
Filename Size
apps/vscode/dist/client.js 111 kB
apps/vscode/dist/server.js 245 kB
packages/alert/dist/index.es.js 1.32 kB
packages/alert/dist/index.js 1.39 kB
packages/alert/dist/style.css 897 B
packages/avatar/dist/index.es.js 1.16 kB
packages/avatar/dist/index.js 1.23 kB
packages/avatar/dist/style.css 411 B
packages/banner/dist/index.es.js 624 B
packages/banner/dist/index.js 695 B
packages/banner/dist/style.css 474 B
packages/box/dist/index.es.js 6.86 kB
packages/box/dist/index.js 6.98 kB
packages/box/dist/style.css 2.65 kB
packages/button/dist/index.es.js 1.87 kB
packages/button/dist/index.js 1.94 kB
packages/button/dist/style.css 3 kB
packages/card/dist/index.es.js 688 B
packages/card/dist/index.js 754 B
packages/card/dist/style.css 666 B
packages/chip/dist/index.es.js 674 B
packages/chip/dist/index.js 745 B
packages/chip/dist/style.css 532 B
packages/clipboard/dist/index.es.js 1.49 kB
packages/clipboard/dist/index.js 1.57 kB
packages/clipboard/dist/style.css 750 B
packages/collapsible/dist/index.es.js 856 B
packages/collapsible/dist/index.js 926 B
packages/collapsible/dist/style.css 81 B
packages/columns/dist/index.es.js 579 B
packages/columns/dist/index.js 651 B
packages/columns/dist/style.css 281 B
packages/components/dist/index.es.js 12.8 kB
packages/components/dist/index.js 12.7 kB
packages/components/dist/style.css 7.26 kB
packages/core/dist/index.es.js 961 B
packages/core/dist/index.js 1.29 kB
packages/counter/dist/index.es.js 330 B
packages/counter/dist/index.js 397 B
packages/counter/dist/style.css 248 B
packages/drawer/dist/index.es.js 1.7 kB
packages/drawer/dist/index.js 2.25 kB
packages/drawer/dist/style.css 490 B
packages/dropdown/dist/index.es.js 1.19 kB
packages/dropdown/dist/index.js 1.25 kB
packages/filter/dist/index.es.js 2.26 kB
packages/filter/dist/index.js 2.33 kB
packages/filter/dist/style.css 907 B
packages/focus-trap/dist/index.es.js 267 B
packages/focus-trap/dist/index.js 333 B
packages/form/dist/index.es.js 4.13 kB
packages/form/dist/index.js 4.24 kB
packages/form/dist/style.css 2.21 kB
packages/icons/dist/index.es.js 1.27 kB
packages/icons/dist/index.js 1.34 kB
packages/icons/dist/style.css 549 B
packages/inline-edit/dist/index.es.js 1.57 kB
packages/inline-edit/dist/index.js 1.65 kB
packages/inline-edit/dist/style.css 329 B
packages/inline/dist/index.es.js 572 B
packages/inline/dist/index.js 643 B
packages/inline/dist/style.css 243 B
packages/markdown/dist/index.es.js 967 B
packages/markdown/dist/index.js 1.04 kB
packages/markdown/dist/style.css 217 B
packages/menu/dist/index.es.js 3.82 kB
packages/menu/dist/index.js 3.9 kB
packages/menu/dist/style.css 861 B
packages/modal/dist/index.es.js 2.97 kB
packages/modal/dist/index.js 3.54 kB
packages/modal/dist/style.css 892 B
packages/navigation/dist/index.es.js 2.73 kB
packages/navigation/dist/index.js 2.8 kB
packages/navigation/dist/style.css 866 B
packages/overlay/dist/index.es.js 1.03 kB
packages/overlay/dist/index.js 1.09 kB
packages/pagination/dist/index.es.js 1.15 kB
packages/pagination/dist/index.js 1.23 kB
packages/pagination/dist/style.css 299 B
packages/popover/dist/index.es.js 3.12 kB
packages/popover/dist/index.js 3.62 kB
packages/popover/dist/style.css 523 B
packages/portal/dist/index.es.js 398 B
packages/portal/dist/index.js 457 B
packages/progress-bubbles/dist/index.es.js 1.74 kB
packages/progress-bubbles/dist/index.js 1.81 kB
packages/progress-bubbles/dist/style.css 813 B
packages/progress/dist/index.es.js 1.07 kB
packages/progress/dist/index.js 1.14 kB
packages/progress/dist/style.css 267 B
packages/stack/dist/index.es.js 464 B
packages/stack/dist/index.js 535 B
packages/stack/dist/style.css 181 B
packages/tab-list/dist/index.es.js 728 B
packages/tab-list/dist/index.js 801 B
packages/tab-list/dist/style.css 410 B
packages/table/dist/index.es.js 931 B
packages/table/dist/index.js 1.01 kB
packages/table/dist/style.css 689 B
packages/tokens/dist/fonts.css 183 B
packages/tokens/dist/index.css 2.35 kB
packages/tokens/dist/index.es.js 2.89 kB
packages/tokens/dist/index.js 2.94 kB
packages/tokens/dist/media-queries.css 113 B
packages/tokens/dist/themes.css 1.11 kB
packages/tooltip/dist/index.es.js 506 B
packages/tooltip/dist/index.js 581 B
packages/tooltip/dist/style.css 326 B
packages/vars/dist/index.es.js 2.4 kB
packages/vars/dist/index.js 2.47 kB

compressed-size-action

@Niznikr Niznikr merged commit 1ecd89a into main Jan 30, 2025
17 checks passed
@Niznikr Niznikr deleted the pheggeseth/fix/prevent-legacy-tag-text-overflow branch January 30, 2025 18:28
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.

2 participants