Skip to content

feat(picker): migrate to spectrum 2 #2697

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 5 commits into from
Jun 18, 2024
Merged

Conversation

jawinn
Copy link
Collaborator

@jawinn jawinn commented Apr 25, 2024

Description

Migrates the Picker component to use Spectrum 2 specifications.

Includes a total overhaul of the Chromatic-only Storybook template in order to increase coverage for this component's many options. This format was based off of the stories for Action button and the grid of Picker options in the S2 / Desktop Figma. See the "Show testing preview" within Storybook. A control for the optional workflow icon that appears to the left of the text within the Picker was added; this was previously on the YML docs but missing from Storybook.

This also fixes:

  • The positioning of Popover in Storybook for the side label variant (this previously was incorrectly appearing to the right instead of below). The Popover width will also now match the width of the Picker in the Storybook examples.

Mod custom property changes

  • The mod custom property --mod-picker-spacing-text-to-alert-icon-inline-start that was previously marked for deprecation has been removed. This is replaced by --mod-picker-spacing-text-to-icon-inline-end.
  • Some of the icon to text and text to icon spacing mods were not working as intended. This has been cleared up and documented.
    • --mod-picker-spacing-starting-icon-to-text added. This affects the optional starting workflow icon.
    • --mod-picker-spacing-text-to-icon-inline-end This affects text spacing to visual (indicator or disclosure).
    • --mod-picker-spacing-text-to-icon removed. This had been applied to different things and was affecting the inline end icon.
  • Additional mod custom properties were added for some quiet values.

CSS-617

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

  • Reviewed and approved by design team (@jawinn) -- good except for followup work to use "inline progress circle" and possible changes to down state for quiet; followup captured in CSS-777
  • Test the default Picker and its controls @marissahuysentruyt
  • Picker is using the new tokens for field width and rounding, as defined on the token specs design file @rise-erpelding
  • Examples in the Picker Chromatic template look correct and like the S2 / Desktop Figma + token specs @rise-erpelding
  • Background color and color do not change when hovering over any disabled state @marissahuysentruyt
  • Fix: Popover appears beneath the Picker instead of weirdly to the side when viewing the side label positioning @marissahuysentruyt
  • "Icon" content field in Storybook is working @marissahuysentruyt

Regression testing

Validate:

  1. The documentation pages for at least two other components are still loading, including:
  • The pages render correctly, are accessible, and are responsive.
  1. If components have been modified, VRTs have been run on this branch:
  • VRTs have been run and looked at.
  • Any VRT changes have been accepted (by reviewer and/or PR author), or there are no changes.

Screenshots

Screenshot 2024-04-25 at 3 15 59 PM

To-do list

  • I have read the contribution guidelines.
  • I have updated relevant storybook stories and templates.
  • I have tested these changes in Windows High Contrast mode.
  • 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.
  • ✨ This pull request is ready to merge. ✨

Copy link

changeset-bot bot commented Apr 25, 2024

🦋 Changeset detected

Latest commit: 31d6a43

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@spectrum-css/picker Major
@spectrum-css/tabs Major

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

@jawinn jawinn force-pushed the jawinn/css-617-s2-picker branch from 6ace85b to 221a5e6 Compare April 25, 2024 19:52
Copy link
Contributor

github-actions bot commented Apr 25, 2024

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

Copy link
Contributor

github-actions bot commented Apr 25, 2024

File metrics

Summary

Total size: 4.23 MB*
Total change (Δ): ⬇ 9.74 KB (-0.22%)

Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.

Package Size Δ
picker 28.80 KB ⬇ 1.87 KB

Details

picker

File Head Base Δ
index-base.css 28.80 KB 28.76 KB ⬆ 0.04 KB (0.12%)
index-vars.css 28.80 KB 30.67 KB ⬇ 1.87 KB (-6.11%)
index.css 28.80 KB 30.67 KB ⬇ 1.87 KB (-6.11%)
metadata.json 14.31 KB 14.78 KB ⬇ 0.48 KB (-3.19%)
index-theme.css - 2.49 KB 🚨 deleted, moved, or renamed
themes/express.css - 1.49 KB 🚨 deleted, moved, or renamed
themes/spectrum.css - 1.58 KB 🚨 deleted, moved, or renamed
* Size determined by adding together the size of the main file for all packages in the library.
* Results are not gzipped or minified.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

@jawinn jawinn force-pushed the jawinn/css-617-s2-picker branch from 221a5e6 to a9e5768 Compare April 25, 2024 20:27
@castastrophe castastrophe force-pushed the spectrum-two branch 5 times, most recently from 6dbc850 to ae7aedd Compare April 26, 2024 20:37
@jawinn jawinn force-pushed the jawinn/css-617-s2-picker branch from dc56977 to 20866aa Compare April 29, 2024 14:27
@jawinn
Copy link
Collaborator Author

jawinn commented Apr 29, 2024

Looking at this in forced-colors, I see that the chevron is the disabled color when the loader is present. That is intentional? On hover it changes color, which I'm guessing should not be the case.

@mdt2
Copy link
Collaborator

mdt2 commented Apr 29, 2024

Looking at this in forced-colors, I see that the chevron is the disabled color when the loader is present. That is intentional? On hover it changes color, which I'm guessing should not be the case.

Yep, my understanding based on chatting with Lynn is that when progress circle is enabled, the component becomes disabled. May be worth checking if that's the case for this component as well since that convo was in the context of the Button component.

@mdt2
Copy link
Collaborator

mdt2 commented Apr 29, 2024

Quick note the we've previously had some issues with Chromatic cutting off screenshots. We should definitely run the VRTs on this to make sure it's able to see everything.

Copy link
Collaborator

@mdt2 mdt2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good, Josh! Pretty big effort. A couple comments for you.

One other thing is that the spacing around the disclosure icon might need some work. For example, on a medium picker that's invalid, the spec says the alert icon to disclosure icon spacing should be picker-visual-to-disclosure-icon-medium, but I see it still set to --spectrum-picker-spacing-text-to-icon which is assigned to --spectrum-text-to-visual-100).

Copy link
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good! The Storybook testing preview for this is much improved! 🎉

I only noted a few very small things in the comments in addition to the things that Melissa noted (I like the idea of looking into a specific downstate size mod to deal with those custom properties there).

@pfulton pfulton force-pushed the spectrum-two branch 2 times, most recently from e0e0fd2 to 698e904 Compare May 3, 2024 18:39
@jawinn jawinn force-pushed the jawinn/css-617-s2-picker branch from ded1555 to 448761c Compare May 6, 2024 17:41
@jawinn
Copy link
Collaborator Author

jawinn commented May 6, 2024

Thanks for looking this over. I've made some updates to address the comments and suggestions so far:

@mdt2

  • The forced-colors disabled icon no longer changes colors on hover. I am bringing up in design review to confirm how this looks overall.
  • "Spacing around the disclosure icon": I was able to untangle these spacing issues with a small refactor in the latest update. They should be the right values now. Previously there was a .spectrum-Picker-label ~ .spectrum-Picker-menuIcon rule which was applying when it shouldn't have been, and overriding the correct tokens.
  • Disabled and and loading no longer show the down state on click. I brought up the question about the down state when using the quiet variant with design.

@rise-erpelding

  • Good callout on the text-to-alert-icon-* tokens. This has been replaced with the updated text-to-visual-* tokens.
  • I've made those two wording updates.

I've also made sure that text truncation of the placeholder text is now captured in the Chromatic template, along with Sizing + Quiet.

@jawinn jawinn force-pushed the jawinn/css-617-s2-picker branch from a755dfd to 27e5907 Compare May 15, 2024 15:32
@jawinn jawinn force-pushed the jawinn/css-617-s2-picker branch from 1b9a3ff to 36fd306 Compare May 31, 2024 20:00
@jawinn
Copy link
Collaborator Author

jawinn commented May 31, 2024

This is ready for a re-review. I've curated and squashed these commits down to 5 from about 17.

There are some followup (can be post-merge) items that I've created in CSS-777.

It also will be necessary to change a couple CSS selectors based on what ends up being decided in the bug fix to main #2737 (ideally before merge).

@castastrophe castastrophe added the S2 Spectrum 2 label Jun 3, 2024
Copy link
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! This looks really good and my only callouts now are pretty small:

I'm seeing spacing-200/12px for "Spacing (minimum, field label to field)" for what looks like the spacing between the side label and picker, but I only see 8px of spacing, should there be more?
image

Should there be Help Text anywhere in the Storybook for Picker or has that been intentionally left out here? (Is it tested in a different component, maybe?)

jawinn added 2 commits June 18, 2024 10:43
Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
@jawinn jawinn force-pushed the jawinn/css-617-s2-picker branch from 975d542 to 31d6a43 Compare June 18, 2024 14:43
@jawinn
Copy link
Collaborator Author

jawinn commented Jun 18, 2024

Weird Testing Preview Loading So I know this isn't always a problem because I've reviewed this PR before and remember seeing it then, too, but sometimes I load the testing preview (locally, because the Netflify preview is broken for me) and it does this: [...]

This was when "open" gets toggled first before switching to the chromatic view. To avoid this I've updated those Chromatic templates to specify isOpen: false on the ones that should stay closed.

Picker Loading Behavior I can click on Picker when it's loading and the Picker chevron changes color, since the menu isn't supposed to be visible in the loading state, that doesn't seem like expected behavior. I can also toggle the Open control for the same effect.

I've put in a fix for this by adding .is-loading to the &.is-open:not selector, and moving the .is-loading styles near the bottom like the .is-disabled styles. The chevron should no longer change color when it happens to have both loading and open set.

Other Loader Weirdness Also, I just captured the loading state for WHCM looking a bit like a solid circle: [...]
But I also just reloaded and saw loader working as it does in SWC so I'm wondering if this is a weird Storybook thing that we shouldn't worry about.

I've noticed some weirdness with the loading of the progress circle as well in other parts of Storybook; a hard refresh usually fixes it (such as on the S2 Docs page for Button->Pending state). The progress circle will be replaced with the in-field progress circle when that is created for S2, which is part of the followup Jira item CSS-777. We'll want to review some of the high contrast styles for both progress circle components when they're worked on (Button had specific high contrast styles worked on with those double borders you see in SWC, but I don't think those carried over to Progress circle itself. And we'll want to make sure they're the same on In-field progress circle).

@jawinn jawinn requested a review from rise-erpelding June 18, 2024 16:11
Copy link
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for answering all my questions! I think this one is good to go!

@jawinn jawinn merged commit 5d730fe into spectrum-two Jun 18, 2024
11 checks passed
@jawinn jawinn deleted the jawinn/css-617-s2-picker branch June 18, 2024 20:26
@github-actions github-actions bot mentioned this pull request Jun 18, 2024
castastrophe pushed a commit that referenced this pull request Dec 27, 2024
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
castastrophe pushed a commit that referenced this pull request Dec 29, 2024
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
castastrophe pushed a commit that referenced this pull request Dec 29, 2024
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
aramos-adobe pushed a commit that referenced this pull request Jan 9, 2025
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
castastrophe pushed a commit that referenced this pull request Jan 17, 2025
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
castastrophe pushed a commit that referenced this pull request Jan 17, 2025
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
castastrophe pushed a commit that referenced this pull request Jan 21, 2025
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
aramos-adobe pushed a commit that referenced this pull request Jan 22, 2025
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
castastrophe pushed a commit that referenced this pull request Jan 22, 2025
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
castastrophe pushed a commit that referenced this pull request Feb 5, 2025
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
castastrophe pushed a commit that referenced this pull request Feb 7, 2025
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
castastrophe pushed a commit that referenced this pull request Feb 7, 2025
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
castastrophe pushed a commit that referenced this pull request Feb 7, 2025
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
castastrophe pushed a commit that referenced this pull request Feb 11, 2025
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
castastrophe pushed a commit that referenced this pull request Feb 24, 2025
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
castastrophe pushed a commit that referenced this pull request Feb 24, 2025
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
castastrophe pushed a commit that referenced this pull request Feb 25, 2025
Migrates the Picker component to Spectrum 2, based on the updated Figma specs.

- Integrate themes CSS files into index.css
- Uses new S2 tokens for field width and corner rounding
- Add down state with new calculated perspective
- The top to alert icon in Spectrum 2 now uses the
  component-top-to-workflow-icon-* tokens as defined on the design.
- Adds the CJK line-height token defined on the design specs.
- Uses border-width-200 instead of border-width-100

* fix(picker): use correct spacing between icons and value text

The spacing between alert icon and disclosure icon was incorrect
because it was being overridden by a selector that shouldn't have been
affecting this scenario (which was using the subsequent-sibling
combinator ~). Some mods around the spacing for the three different
types of icons were also not working as expected.

Fixes this spacing and clarifies which spacing is which. Renames the mod
that applies to the optional workflow icon to the left of the value.

Simplifies quiet styles by changing custom property values instead of
adding extra styles.

* feat(picker): storybook - expanded and improved chromatic template

Expands the Chromatic-only template in Storybook to increase coverage
of different options.

Organizes the stories into sections using the formatting and typography
previously established with Action button. States in each section are
based on the grid of options in the Desktop S2 design Figma, with some
additions such as the loading state. And the Switch examples from the
existing template.

Removes the "Open" story which is now covered in the Chromatic template.

Adds missing icon (to left of value/placeholder text) option to
Storybook, along with VRT coverage.

Improves display of Popover within these different contexts; fixes how
it is aligned on the side label example. Changes the side label example
to use flex row instead of using inline-block which could wrap as the
screen shrunk.

=== Other Storybook fixes and additions ===

- Adds aria-labelledby and unique ids to make sure the label is associated
  with the Picker.
- Includes downstate dimension capture
- Popover does not show when in the loading state (per design feedback)
- Makes sure HelpText appears below the Picker when using side label, by
  adjusting its wrapper markup.
- Adds conditional controls to disabled and loading states, per the PR
  feedback that disabled + loading should not be a possible combo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants