-
Notifications
You must be signed in to change notification settings - Fork 210
feat(taggroup): spectrum 2 migration #3966
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 5 commits into
spectrum-two
from
rise-erpelding/css-1037-s2-tag-group
Jun 26, 2025
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5f8cad0
feat(taggroup): spectrum 2 migration
rise-erpelding aefb258
fix(taggroup): pr feedback updates
rise-erpelding 0603cee
fix(taggroup): style empty state
rise-erpelding b73326d
fix(taggroup): add disabled action button setting
rise-erpelding 2fb8a7b
docs: update custom styles and action button controls
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,38 @@ | ||
| --- | ||
| "@spectrum-css/taggroup": major | ||
| --- | ||
|
|
||
| The Spectrum 2 version of Tag Group is a major change from its Spectrum 1 counterpart. | ||
|
|
||
| Major style changes include: | ||
|
|
||
| - Use of new tokens and custom properties for spacing tags. The method of spacing between tags has changed. Where previously tags were spaced using tokens to represent inline and block margins on each tag, tags are now spaced by tokens representing the gaps between tags. | ||
| - Rather than being a single size, Tag group now comes in t-shirt sizes: Small, medium, and large. These sizes should determine the sizes of the embedded components, but also the spacing between tags. | ||
| - Tag group can now accommodate a side label. To do so, it makes use of a grid layout. | ||
| - In order to match the layout in the spec, more embedded components besides Tag have been added. Field label, Help text, and Action button (quiet) components have been added to the Storybook implementation, and styles are set for these embedded components within the tag group layout. | ||
|
|
||
| In order to support the aforementioned spacing changes, the two mod properties for margin have been removed: | ||
|
|
||
| - `--mod-tag-group-item-margin-block` | ||
| - `--mod-tag-group-item-margin-inline` | ||
|
|
||
| Instead, please customize spacing between tags with: | ||
|
|
||
| - `--mod-tag-group-block-tag-spacing` | ||
| - `--mod-tag-group-inline-tag-spacing` | ||
|
|
||
| These custom properties may need to be set to be double the previous margin values in order to achieve the same spacing. | ||
|
|
||
| To support custom spacing of the embedded components, several other new mod properties have been added: | ||
|
|
||
| - `--mod-tag-group-block-spacing-label-to-tags` | ||
| - `--mod-tag-group-inline-spacing-label-to-tags` | ||
| - `--mod-tag-group-spacing-help-text-to-tags` | ||
|
|
||
| To support the optional empty state (when there are no tags in the tag group), several passthroughs to modify the body typography text element have been added, including: | ||
|
|
||
| - `--mod-body-cjk-line-height` | ||
| - `--mod-body-font-size` | ||
| - `--mod-body-line-height` | ||
| - `--mod-body-margin-end` | ||
| - `--mod-body-margin-start` | ||
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 |
|---|---|---|
| @@ -1,15 +1,58 @@ | ||
| { | ||
| "sourceFile": "index.css", | ||
| "selectors": [".spectrum-TagGroup", ".spectrum-TagGroup-item"], | ||
| "selectors": [ | ||
| ".spectrum-TagGroup", | ||
| ".spectrum-TagGroup--sideLabel", | ||
| ".spectrum-TagGroup--sideLabel .spectrum-TagGroup-actionButton", | ||
| ".spectrum-TagGroup--sideLabel .spectrum-TagGroup-helpText", | ||
| ".spectrum-TagGroup--sideLabel .spectrum-TagGroup-label", | ||
| ".spectrum-TagGroup--sideLabel .spectrum-TagGroup-tags", | ||
| ".spectrum-TagGroup--sizeL", | ||
| ".spectrum-TagGroup--sizeS", | ||
| ".spectrum-TagGroup-actionButton", | ||
| ".spectrum-TagGroup-helpText", | ||
| ".spectrum-TagGroup-label", | ||
| ".spectrum-TagGroup-tags", | ||
| ".spectrum-TagGroup:lang(ja)", | ||
| ".spectrum-TagGroup:lang(ko)", | ||
| ".spectrum-TagGroup:lang(zh)" | ||
| ], | ||
| "modifiers": [ | ||
| "--mod-tag-group-item-margin-block", | ||
| "--mod-tag-group-item-margin-inline" | ||
| "--mod-body-cjk-line-height", | ||
| "--mod-body-font-size", | ||
| "--mod-body-line-height", | ||
| "--mod-body-margin-end", | ||
| "--mod-body-margin-start", | ||
| "--mod-tag-group-block-spacing-label-to-tags", | ||
| "--mod-tag-group-block-tag-spacing", | ||
| "--mod-tag-group-inline-spacing-label-to-tags", | ||
| "--mod-tag-group-inline-tag-spacing", | ||
| "--mod-tag-group-spacing-help-text-to-tags" | ||
| ], | ||
| "component": [ | ||
| "--spectrum-tag-group-item-margin-block", | ||
| "--spectrum-tag-group-item-margin-inline" | ||
| "--spectrum-tag-group-block-spacing-label-to-tags", | ||
| "--spectrum-tag-group-block-tag-spacing", | ||
| "--spectrum-tag-group-inline-spacing-label-to-tags", | ||
| "--spectrum-tag-group-inline-tag-spacing", | ||
| "--spectrum-tag-group-spacing-help-text-to-tags" | ||
| ], | ||
| "global": [ | ||
| "--spectrum-cjk-line-height-100", | ||
| "--spectrum-component-bottom-to-text-100", | ||
| "--spectrum-component-bottom-to-text-200", | ||
| "--spectrum-component-bottom-to-text-75", | ||
| "--spectrum-component-top-to-text-100", | ||
| "--spectrum-component-top-to-text-200", | ||
| "--spectrum-component-top-to-text-75", | ||
| "--spectrum-field-label-to-component", | ||
| "--spectrum-font-size-100", | ||
| "--spectrum-font-size-200", | ||
| "--spectrum-font-size-75", | ||
| "--spectrum-help-text-to-component", | ||
| "--spectrum-line-height-100", | ||
| "--spectrum-spacing-100", | ||
| "--spectrum-spacing-200" | ||
| ], | ||
| "global": ["--spectrum-spacing-75"], | ||
| "passthroughs": [], | ||
| "high-contrast": [] | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.