Skip to content

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

Merged
merged 54 commits into from
Jun 2, 2023

Conversation

jawinn
Copy link
Collaborator

@jawinn jawinn commented Apr 10, 2023

Description

Core tokens migration:
Updates the search component to use core tokens defined on the Figma design.
This also includes:

  • Support for t-shirt sizes
  • Updates to docs to include additional examples, and storybook updates
  • Fix: inputted text no longer goes underneath the reset/clear button
  • Fix: correct disabled color is used for magnifying glass icon
  • Fix: round edges of button no longer appear on top of border in WHCM/forced-color mode

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 to search. These were not a part of the design of textfield and were specific to search.

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

  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have tested these changes in Windows High Contrast mode.
  • This pull request is ready to merge.

jawinn added 11 commits April 7, 2023 17:54
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.
@github-actions
Copy link
Contributor

github-actions bot commented Apr 10, 2023

🚀 Deployed on https://pr-1761--spectrum-css.netlify.app

@github-actions github-actions bot temporarily deployed to pull request April 10, 2023 14:45 Inactive
@jawinn jawinn added the breaking change Results in a breaking API change label Apr 10, 2023
Copy link
Collaborator

@pfulton pfulton left a 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.

@pfulton pfulton requested a review from castastrophe April 10, 2023 17:22
Include missing 'mod' prefixed custom property for this token.

Co-authored-by: Patrick Fulton <360251+pfulton@users.noreply.github.com>
@github-actions github-actions bot temporarily deployed to pull request April 11, 2023 19:06 Inactive
jawinn added 2 commits April 12, 2023 11:38
- 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.
@jawinn jawinn requested a review from pfulton April 12, 2023 15:42
@github-actions github-actions bot temporarily deployed to pull request April 12, 2023 15:51 Inactive
Copy link
Collaborator

@pfulton pfulton left a 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.

jawinn added 2 commits April 14, 2023 09:51
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.
@github-actions github-actions bot temporarily deployed to pull request April 14, 2023 14:05 Inactive
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.
@pfulton
Copy link
Collaborator

pfulton commented May 25, 2023

Released: @spectrum-css/search@6.0.0-beta.2

@github-actions github-actions bot temporarily deployed to pull request May 25, 2023 18:50 Inactive
@github-actions github-actions bot temporarily deployed to pull request May 26, 2023 21:17 Inactive
@github-actions github-actions bot temporarily deployed to pull request May 30, 2023 14:48 Inactive
jawinn added 2 commits May 30, 2023 16:38
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.
@github-actions github-actions bot temporarily deployed to pull request May 30, 2023 20:50 Inactive
@github-actions github-actions bot temporarily deployed to pull request May 30, 2023 21:05 Inactive
@github-actions github-actions bot temporarily deployed to pull request June 1, 2023 14:40 Inactive
@jawinn jawinn force-pushed the jawinn/css-384-search-field-core-tokens branch from 1b3f53c to 1449c41 Compare June 1, 2023 14:45
@github-actions github-actions bot temporarily deployed to pull request June 1, 2023 14:55 Inactive
@pfulton pfulton added the run_vrt For use on PRs looking to kick off VRT label Jun 1, 2023
@github-actions github-actions bot removed the run_vrt For use on PRs looking to kick off VRT label Jun 1, 2023
jawinn added 2 commits June 2, 2023 13:49
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.
@github-actions github-actions bot temporarily deployed to pull request June 2, 2023 18:34 Inactive
@pfulton pfulton merged commit b54d8ef into main Jun 2, 2023
@pfulton pfulton deleted the jawinn/css-384-search-field-core-tokens branch June 2, 2023 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Results in a breaking API change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants