-
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): rename is-focused class to is-keyboardFocused #2377
Conversation
File metricsSummaryTotal size: 3.92 MB*
Detailspicker
* Results are not gzipped or minified. * An ASCII character in UTF-8 is 8 bits or 1 byte. |
🚀 Deployed on https://pr-2377--spectrum-css.netlify.app |
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 looks good! Probably should run VRTs before merging.
9f461bc
to
f86f46a
Compare
f86f46a
to
7472b6a
Compare
7472b6a
to
805b974
Compare
After looking at how SWC is converting this, I've decided not to remove the class and have renamed it to |
3bd31c6
to
db01584
Compare
db01584
to
2d57d6e
Compare
2d57d6e
to
7ea959f
Compare
The .is-focused class was being used as if it was .is-keyboardFocused, in combination with :focus-visible in selectors. This class has been removed as it is handled by :focus-visible on the button. This fixes an existing issue on the docs site, where if you click the picker twice, the focus indicator ring will appear. This is because of the docs site adding the .is-focused class. Updated the existing story that was labeled "Focused" that was showing keyboard focused to use the play function, for Chromatic coverage ref: https://www.chromatic.com/docs/hoverfocus/
Rather than removing the class, keep it in its renamed form in order for SWC to still be able to convert it to an attribute and continue testing it via its Storybook control.
7ea959f
to
5a5925b
Compare
Description
This update renames the
.is-focused
class as it was previously being used as if it were.is-keyboardFocused
.This also fixes a bug in the docs site where the focus indicator was appearing when you clicked the picker twice.
NOTE: This will affect the current spectrum CSS config file for the SWC version of this component, which looks like it will need to change its conversion of this class to an attribute to use
.is-keyboardFocused
instead.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
Regression testing
Validate:
Screenshots
To-do list