-
Notifications
You must be signed in to change notification settings - Fork 235
fix(tooltip): force label wrapping #5878
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
Conversation
🦋 Changeset detectedLatest commit: 3ddbb1a The changes in this PR will be included in the next version bump. This PR includes changesets to release 78 packages
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 |
📚 Branch Preview🔍 Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
45aefe2 to
043cece
Compare
b69aeb5 to
ea779aa
Compare
caseyisonit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love a quick fix!
I left one suggestion, but I'm not sure it should block the PR. I thought there was some discussion recently-ish around the formatting we need in the SWC changesets to make sure we have proper hierarchy or headings or something in the global changelog. Anyways, I've been trying to use the changeset guidelines more, so I left a link because it always takes me a few tries to find it!
Co-authored-by: Marissa Huysentruyt <69602589+marissahuysentruyt@users.noreply.github.com>
41e25d4 to
84cbb4a
Compare
📚 Branch Preview Links🔍 First Generation Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
Description
Fixes an issue with tooltip text overflow: long, unbroken words were not wrapping and overflowed the container. See screenshots.
Motivation and context
We have
overflow-wrap: break-word;on#tooltip, but needinline-size: 100%on the label to force it to wrap properly in cases of longer text without spaces.#5504 previously updated the CSS to remove the deprecated
word-break: break-wordin favor ofoverflow-wrap: break-word. @5t3ph explains and fixes the issue that this causes in CSS via adobe/spectrum-css#4044. This PR carries that fix over to be applied in SWC.The fix in adobe/spectrum-css#4044 does not require modifications for icons because it addresses the S2 version of tooltip, where icon variants have been removed. Therefore, additional modifications were made here to accommodate the tooltip variants that include icons.
Related issue(s)
Screenshots
Before:



After:



Author's checklist
I have added automated tests to cover my changes.I have included updated documentation if my change required it.Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Check regular tooltip wrapping (no icon)
Check tooltip wrapping with icon
Device review