-
Notifications
You must be signed in to change notification settings - Fork 201
chore(search)!: core tokens migration #1761
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
BREAKING CHANGE: Changes to packages and gulpfile for the core token migration. Now uses @spectrum-css/tokens.
Set up majority of sizing and spacing tokens, in order to use new tokens for the existing CSS, with express changes. Creates a working build before adding additional tokens.
Add tokens and style overrides for focus indicator ring/underline.
- Update example docs. Added examples for help text. - Added token and CSS for help text spacing, from design. - Separate out spectrum vars that have express vars.
- Include theme CSS and 'quiet' in storybook. - Remove skin.css and integrate CSS into main index.css - Start bringing over color tokens + styles to use them
Add additional tokens to account for the rest of the tokens defined in the design. Including border color and padding on all sides. Also fixes existing bug where text within the input will go underneath the reset button (there was not enough right padding to account for the button).
Add Storybook control to search component with t-shirt size options.
Finalize forced colors for Windows High Contrast Mode support. - Using Field and FieldText system colors as recommended by spec. - Includes fix for bg color on clear button appearing over border.
Remove the backface-visibility property, as it triggers what looks like a Safari bug (16.4) where the search icon is not visible on the standard variant. This property was to help improve a minor issue with sub-pixel rendering while scrolling, noticed in Edge WHCM.
🚀 Deployed on https://pr-1761--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.
Just one tiny thing here @jawinn - otherwise, this looks great.
Include missing 'mod' prefixed custom property for this token. Co-authored-by: Patrick Fulton <360251+pfulton@users.noreply.github.com>
- Increased specificity of forced color rules, so that the values in this component override all the ones in the clearbutton sub-component. - Improved fix to background color overlap on the clear button. The previous fix of a transparent background would have created a mismatch of "system color pairings" which isn't ideal according to the spec. The modified fix pushes the edges of the button to be within the component's border.
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.
Nice work, @jawinn - lookin' good!
Just a few things here + whatever comes out of the design review.
Add missing link to the "View guidelines" page in the docs for the search component (guidelines call it "Search field").
The clear button should not display when the input is disabled.
Move out some repeated custom properties for quiet that don't need to be in the system specific theme files. Added specificity was necessary so they are not overridden by the custom properties of the same name defined in .spectrum-Search for the two system themes, since those are tacked on by the build at the end of the CSS.
Released: |
Changes one of the forced-colors (Windows high contrast) mode fixes for the overlapping close button, that was causing an issue on the SWC draft merge VRTs. This accomplishes the fix is a different way, which is simpler and does not involve any positioning changes. It now uses the forced-color-adjust none to keep the transparent background on the close button in high contrast mode.
1b3f53c
to
1449c41
Compare
Run prettier and stylelint on all search component files after a merge with --no-verify, to get everything up to date and passing the linter checks.
Description
Core tokens migration:
Updates the
search
component to use core tokens defined on the Figma design.This also includes:
Also updates the
textfield
component to address the TODO comment "reevaluate icon styles when search field is migrated". The search icon related styles and story entry have been removed from the textfield component, and a couple lines of CSS brought over tosearch
. These were not a part of the design of textfield and were specific tosearch
.CSS-384
How and where has this been tested?
Tested on MacOS Chrome, Firefox, and Safari. Tested in Edge WHCM via AssistivTunnel.
To-do list