-
Notifications
You must be signed in to change notification settings - Fork 204
feat(pickerbutton): migrate to s2 #4114
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
rise-erpelding
merged 14 commits into
spectrum-two
from
rise-erpelding/picker-button-s2
Aug 11, 2025
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6433d6f
docs(infieldbutton): remove unused invalid state from template
rise-erpelding 34fe8b0
fix(infieldbutton): remove unused keyfocus and border mods
rise-erpelding 12cf7d8
feat(pickerbutton): add hover/active states to tests and controls
rise-erpelding 04e71ab
docs(pickerbutton): update params
rise-erpelding 04a16b4
refactor(pickerbutton): pull out rounded and position variants
rise-erpelding 8642064
docs(pickerbutton): remove focus state from template
rise-erpelding a9dc9be
feat(pickerbutton): migrate CSS to S2
rise-erpelding d48a7af
feat(pickerbutton): remove label variant
rise-erpelding f3a1f1d
feat(pickerbutton): support custom sized workflow icons
rise-erpelding ac55669
docs(pickerbutton): docs updates
rise-erpelding 5eb85c4
feat(pickerbutton): adjust the way custom icon size works
rise-erpelding ce13a91
chore(pickerbutton): changeset
rise-erpelding 2a6acc8
feat(pickerbutton,infieldbutton): WHCM support
rise-erpelding 13238b6
docs(pickerbutton): a few PR updates
rise-erpelding File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
"@spectrum-css/pickerbutton": major | ||
--- | ||
|
||
The picker button component has been migrated to Spectrum 2. The picker button uses the same design spec as infield button and in some cases may be able to be used interchangeably with it. Its updated features include: | ||
|
||
- Corner rounding updates - corner rounding differs by the component's t-shirt size, but otherwise is a standard size. This means that the rounded variant of picker button with increased corner rounding and the position variants of picker button that helped the picker button fit snugly within either side of an input have been removed. | ||
- Color and spacing updates to match S2 spec | ||
- Added WHCM support | ||
- Updated S2 down state | ||
- Removed focus styles: there are no spec'd focus styles in S2, therefore these styles have been removed. | ||
- The label variant of picker button has been removed. | ||
- Removal of `.spectrum-PickerButton--uiicononly`, `.spectrum-PickerButton--icononly`, and `.spectrum-PickerButton--textuiicon` classes: | ||
- The picker button featuring a UI icon is the default variant, so no additional `.spectrum-PickerButton--uiicononly` class needs to be applied. | ||
- The `.spectrum-PickerButton--icononly` class has been renamed to `.spectrum-PickerButton--workflowicon` to clarify when it should be used. Applying `.spectrum-PickerButton--workflowicon` when using a workflow icon instead is recommended, but probably not required. | ||
- Because the picker button no longer supports a label, there is no need for a `--textuiicon` variant which is why that class has been removed. | ||
- The `.is-open` state can continue to be used as before. | ||
|
||
Added mod custom properties: | ||
|
||
- `--mod-picker-button-background-color-quiet-disabled` | ||
|
||
Removed mod custom properties: | ||
|
||
- `--mod-picker-button-background-color-key-focus` | ||
- `--mod-picker-button-background-color-key-focus-quiet` | ||
- `--mod-picker-button-border-color` | ||
- `--mod-picker-button-border-color-disabled` | ||
- `--mod-picker-button-border-color-quiet` | ||
- `--mod-picker-button-border-radius-rounded` | ||
- `--mod-picker-button-border-radius-rounded-sided` | ||
- `--mod-picker-button-border-radius-sided` | ||
- `--mod-picker-button-border-width` | ||
- `--mod-picker-button-font-color` | ||
- `--mod-picker-button-font-color-disabled` | ||
- `--mod-picker-button-font-color-down` | ||
- `--mod-picker-button-font-color-down-disabled` | ||
- `--mod-picker-button-font-color-hover` | ||
- `--mod-picker-button-font-color-hover-disabled` | ||
- `--mod-picker-button-font-color-key-focus` | ||
- `--mod-picker-button-font-family` | ||
- `--mod-picker-button-font-size` | ||
- `--mod-picker-button-font-style` | ||
- `--mod-picker-button-font-weight` | ||
- `--mod-picker-button-gap` | ||
- `--mod-picker-button-icon-color-key-focus` | ||
- `--mod-picker-button-label-padding` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"@spectrum-css/infieldbutton": patch | ||
--- | ||
|
||
Remove unused key-focus and border mods. Note that border and key focus styles were previously removed in the migration to Spectrum 2, and the mod removals here do not have any visual impact to the infield button. | ||
|
||
Also updates transition to use `background-color` instead of `border-color`. | ||
|
||
Also fixes a flash bug in WHCM: when hovered, the infield button was flashing/blinking before changing to the appropriate hover color. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is it helpful to mention that mods were removed? is that a breaking change though? If it is, would this be a "major" bump instead of a patch?
Uh oh!
There was an error while loading. Please reload this page.
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.
They were all unused, so technically they would have stopped working with the last major bump, even though they were still declared in the file. To me that's why it feels less relevant to name them, but I'm open to other arguments.
But I'm wondering if I need to be a little clearer that this isn't where key-focus and border have been removed, because upon first glance that does make it sound like a major change. I'll add something to the changeset here.