feat(actionbutton): s2 migration#2669
Conversation
|
🚀 Deployed on https://pr-2669--spectrum-css.netlify.app |
File metricsSummaryTotal size: 1.37 MB*
actionbutton
* An ASCII character in UTF-8 is 8 bits or 1 byte. |
de5e49c to
6220dae
Compare
rise-erpelding
left a comment
There was a problem hiding this comment.
Hi, this is looking really good!
- S2 Token spec appears to match, mostly
- The only thing I noticed here was that I didn't see a cjk line height being applied, and I think there is one in the spec
- I also didn't look very closely at spacing since we'd previously talked about that not matching the spec, but I can if you'd like me to!
- Static white and static black don't have emphasized styling/no control is visible in Storybook ✅
- WHCM is looking good, both light and dark ✅
- I did have a question though, there is no style differentiation for selected hover state as there is for non-forced-colors, it's the same purple/cyan color for selected as it is for selected & hover. It's already like this in prod, so nothing that was introduced here. Is that something that would be worthwhile to fix here, to give it a different border color or something like that on hover?
- All variants and states are being shown in the testing preview ✅
|
Thanks Rise! To document some context here, when you say "didn't look very closely at spacing since we'd previously talked about that not matching the spec" we're talking about the top to edge spacing tokens, which don't seem to be needed since we're using |
jawinn
left a comment
There was a problem hiding this comment.
Excellent work! ⭐ I did not notice any issues after going through the validation steps and comparing against the Figma.
f3dd9ff to
9931a8e
Compare
6dbc850 to
ae7aedd
Compare
6220dae to
e5e36b9
Compare
🦋 Changeset detectedLatest commit: 0254045 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 |
e0e0fd2 to
698e904
Compare
0faaab2 to
24419a9
Compare
Fixes the issue where the static black and white, quiet, selected, and disabled state in the testing grid was showing the static quiet background color instead of the static disabled background color.
The noted readability backplate issue was present on more than just the selected state; it was just difficult to see without contrasting colors. So this has been moved to the default, along with setting default system color values.
Refactors high contrast styles and custom properties to remove unnecessary variables, and adds some documentation.
Keep the previous S1 behavior of setting the line-height to the full component height. This prevents Thai diacritics from being cut off (see existing Storybook test). Note: this line-height is taller than both line-height-100 and cjk-line-height-100 listed on the design spec. Using those had resulted in the diacritics cutting off again.
Adjust some selectors to use :has in order to remove some overly complex calc functions, and to use the inline spacing tokens more like they are defined on the token specs. Now that :has is supported and used in our library, this simplifies this usage and removes some requirements for the source order of action button's child elements.
Usage notes about using a mod for static colors no longer applies; the --mod-actionbutton-content-color-default-selected mod and similar selected state mods work correctly to change the content color for static. Adds some basic intro docs for static colors, pulled from the guidelines.
The .spectrum-ActionButton--sizeM class is no longer used but was still appearing in the examples markup.
In Windows High Contrast, the border color briefly was flashing orange (ButtonBorder) after hover, before it switched back to the correct color as defined by the styles. This fixes that issue. This removes CSS transitions in high contrast to avoid some of these rendering issues and previously noticed sluggishness in the system color transitions.
4bda4e0 to
398aa22
Compare
Description
Migrates Action Button to Spectrum 2 design specifications. Includes:
.spectrum-Switch--sizeMhas been removed.transparentand the mod custom properties were removed so as not to interfere with WHCM accessibility. High contrast styles have been refactored and improved.:has, since it is now used and supported in our library. This removes some overly complexcalc()functions used for inline spacing, uses the design tokens more directly, and removes the previously documented need for the component's child elements to use a specific source order.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
Expected diffs of note: "Static black - emphasized" and "Static white - emphasized" are removed from tests.
Validate:
To-do list