-
Notifications
You must be signed in to change notification settings - Fork 236
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: ea779aa 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
043cece to
b69aeb5
Compare
b69aeb5 to
ea779aa
Compare
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