Skip to content

feat(badge): S2 migration#3740

Merged
5t3ph merged 7 commits into
spectrum-twofrom
seckles/css-1033-s2-badge
May 19, 2025
Merged

feat(badge): S2 migration#3740
5t3ph merged 7 commits into
spectrum-twofrom
seckles/css-1033-s2-badge

Conversation

@5t3ph
Copy link
Copy Markdown
Contributor

@5t3ph 5t3ph commented May 15, 2025

Description

This migrates the base Badge component to S2 designs, but does not include the "Notification" or "Highlight" types.

  • Updated/expanded colors
    • New colors:
      • pink
      • turquoise
      • brown
      • cinnamon
      • silver
  • New "styles"
    • subtle (lighter version of bg color)
    • outline (border color, only semantic)
  • Updated border-radius per size
  • Updated border-width
    • updated related padding/margin definitions to account for border-width

New mods

New mods added for each new color, as well as for the style-related application of each valid color, ex. --mod-badge-subtle-background-color-accent and --mod-badge-outline-border-color-informative.

Also added for the default --mod-badge-border-color and --mod-badge-border-width

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

Token specs

  • All new color tokens are added for new "bold" colors, and style variants of "subtle" and "outline" [@cdransf]
  • new "style" variants use correct tokens [@cdransf]
  • corner-radius is updated for t-shirt sizes [@cdransf]
  • border-width is updated, and accounted for in badge layout [@cdransf]
  • font-weight is updated (note that this does't have much impact with Adobe Clean, assume is intended to matter for Adobe Clean VF) [@cdransf]

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.

Screenshots

image

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. ✨

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 15, 2025

🦋 Changeset detected

Latest commit: 469910e

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

This PR includes changesets to release 1 package
Name Type
@spectrum-css/badge 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2025

File metrics

Summary

Total size: 1.41 MB*

Package Size Minified Gzipped
badge 22.97 KB 21.97 KB 2.68 KB

badge

Filename Head Minified Gzipped Compared to base
index.css 22.97 KB 21.97 KB 2.68 KB 🔴 ⬆ 10.85 KB
metadata.json 15.50 KB - - 🔴 ⬆ 8.44 KB
* Size is the sum of all main files for packages in the library.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2025

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

@5t3ph 5t3ph added size-1 XS ~1-6hrs; nearly trivial, a few hours, could do more than one in a single day. ready-for-review S2 Spectrum 2 labels May 15, 2025
@cdransf
Copy link
Copy Markdown
Member

cdransf commented May 15, 2025

This looks awesome! Validation steps check out, nothing looks out of place in the token and mod updates and the changes look great in dark mode and WHC as well. The only change I'd consider would be to highlight the new tokens in the changelog. ✨

@5t3ph 5t3ph merged commit 075fc91 into spectrum-two May 19, 2025
12 checks passed
@5t3ph 5t3ph deleted the seckles/css-1033-s2-badge branch May 19, 2025 14:53
@castastrophe castastrophe mentioned this pull request Aug 6, 2025
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review S2 Spectrum 2 size-1 XS ~1-6hrs; nearly trivial, a few hours, could do more than one in a single day.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants