-
Notifications
You must be signed in to change notification settings - Fork 198
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(picker): prevent diacritic text cutoff #2914
Conversation
🦋 Changeset detectedLatest commit: 4b82b96 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
🚀 Deployed on https://pr-2914--spectrum-css.netlify.app |
File metricsSummaryTotal size: 4.63 MB* Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.
Detailspicker
* Results are not gzipped or minified. * An ASCII character in UTF-8 is 8 bits or 1 byte. |
311771a
to
b057e3f
Compare
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.
This seems like a nice, simple fix! I didn't see any cutoff in the span
text in any of the sizes, I tried to combine a bunch of the states to see if I could break it. I also tested in Chrome, Firefox, Safari and Edge on Mac, but it all looks good!
My only question now is do we drop those 2 temp commits (changing the text to Thai, and then the corresponding revert)? If we merged it right now, it would be ok, but do we have a preference for "temporary" commits?
Great catch on the spelling correction too! 🎉
My original intention was to not have reverted the temporary commit for validation purposes and then to drop the commit before merging, but then I reverted it to run VRTs and ran into that unexpected diff that I wanted feedback on, so I left it that way. I think I would probably just squash/fixup those commits. Also was thinking there wasn't a lot of reason to keep the spelling change for "country" as a separate commit, so that'd be squashed in with the fix here. |
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.
Thanks for digging into this one and I'm glad it was a pretty simple fix.
@@ -207,7 +207,7 @@ const Variants = (args) => html` | |||
...args, | |||
isOpen: false, | |||
withSwitch: true, | |||
placeholder: "Select your contry of origin", | |||
placeholder: "Select your country of origin", |
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.
Thanks for catching this!
b057e3f
to
4b82b96
Compare
Checking if there is any action I need to take in RSP. |
Description
Addressing CSS-810, this fix addresses a bug that was called out recently, similar to what was seen in Textfield for both Spectrum CSS and React Spectrum with text with diacritics being cut off vertically. In this case, as the affected text occurs in a
<span>
rather than an<input>
tag, the line-height does not need an adjustment, and changing the margin to padding appears to be sufficient to allow the vertical cutoff to be displayed.There is also a draft PR to fix the same issue that uses the same line-height fix that is seen in textfield.
Note: When testing with Assistiv Labs, this cutoff issue did not appear to be present (in production)--this fix has been tested in Assistiv Labs (Chrome, Firefox, Edge) and does not appear to have an impact there.
How and where has this been tested?
Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.
Validation steps
main
branch to see the cutoff issue.a1fab905fba48b9d3cf641a19160bee1b07e376a
to temporarily change the English in Picker to Thai. This was a temporary commit I'd put in the PR but reverted in order to run VRTs.Regression testing
Validate:
Screenshots
Before:

After:

To-do list