Skip to content

Update badge icon 1.3.0#3576

Draft
hannahiss wants to merge 10 commits into
tokenator-update-tokens-20260505093858from
update-badge-icon-1.3.0
Draft

Update badge icon 1.3.0#3576
hannahiss wants to merge 10 commits into
tokenator-update-tokens-20260505093858from
update-badge-icon-1.3.0

Conversation

@hannahiss
Copy link
Copy Markdown
Member

@hannahiss hannahiss commented May 13, 2026

Types of change

  • Non-breaking change
  • Breaking change (fix or feature that would change existing functionality and usage)

Related issues

Closes #3541

Context & Motivation

Tokens update to 2.4.0

Description

  • Addition of 2 new sizes (Xsmall and Small)
  • For the “Positive”, “Info”, “Warning”, and “Negative” status variants:
    • Replacement of the vector icon with a new asset without internal padding.
    • Removal of space-inset tokens → 0px
  • For the “Neutral” and “Accent” status variants and for the 2 new sizes:
    • Size: Xsmall → Addition of a new token space-inset-xsmall
    • Size: Small → Addition of a new token space-inset-small

Checklists

  • I have read the contributing guidelines
  • My change follows the developer guide
  • My change pass all tests
  • My change is compatible with a responsive display
  • I have added tests (Javascript unit test or visual) to cover my changes
  • My change introduces changes to the documentation that I have updated accordingly
    • Title and DOM structure is correct
    • Links have been updated (title changes impact links)
    • CSS for the documentation
  • I have checked all states and combinations of the component with my change
  • I have checked all the impacts for the other components and core behavior (grid, reboot, utilities)

Checklist (for Core Team only)

  • The changes need to be in the migration guide
  • The changes are well displayed in Storybook (be careful if example order has changed for DSM)
  • The changes are compatible with RTL
  • Manually test browser compatibility with BrowserStack (Chrome 120, Firefox 121, Edge 120, Safari 15.6, iOS Safari, Chrome & Firefox on Android)

Progression (for Core Team only)

Live previews

@netlify
Copy link
Copy Markdown

netlify Bot commented May 13, 2026

Deploy Preview for boosted failed. Why did it fail? →

Name Link
🔨 Latest commit 0649a7a
🔍 Latest deploy log https://app.netlify.com/projects/boosted/deploys/6a04a78f14dcc80008b3339b

@netlify
Copy link
Copy Markdown

netlify Bot commented May 13, 2026

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit d85c591
🔍 Latest deploy log https://app.netlify.com/projects/boosted/deploys/6a1055b1fce5b8000821c491
😎 Deploy Preview https://deploy-preview-3576--boosted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@hannahiss hannahiss linked an issue May 19, 2026 that may be closed by this pull request
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the badge-icon component to align with the newer design tokens (system tokens 2.4.0) and the “Update badge - icon 1.3” spec, including new icon assets and additional supported sizes.

Changes:

  • Added xsmall and small size variants for badge-icon documentation and styling.
  • Reworked functional status badge-icon rendering to use new SVG mask assets (including a two-layer warning icon) and updated padding tokens.
  • Added new badge icon SVG token assets per brand and updated Bundlewatch thresholds to reflect the CSS size increase.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
site/src/content/docs/components/badges.mdx Updates badge-icon docs/examples for new sizes and disabled/variant states.
scss/_badges.scss Refactors badge-icon styling (new size vars, status variant mixin, mask-based icons).
packages/sosh/scss/tokens/_composite.scss Adds new badge icon SVG assets (positive/info/warning/negative).
packages/orange/scss/tokens/_composite.scss Adds new badge icon SVG assets (positive/info/warning/negative).
packages/orange-compact/scss/tokens/_composite.scss Adds new badge icon SVG assets (positive/info/warning/negative).
.bundlewatch.config.json Updates max bundle sizes to accommodate CSS growth from new assets/styles.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scss/_badges.scss
Comment on lines +84 to +92
&:has(.badge-status-icon) {
--#{$prefix}badge-color: #{$ouds-color-surface-status-negative-emphasized};
--#{$prefix}badge-background-color: #{$ouds-color-content-on-status-negative-emphasized};
position: relative;
display: block;
flex-shrink: 0;
width: var(--#{$prefix}badge-size);
height: var(--#{$prefix}badge-size);
padding: 0;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Righto, idk what was the rationale behind adding display: block here but it works the same without it and works for inline Badge-icon too. So I will delete

Comment thread scss/_badges.scss
Comment on lines +32 to +35
.badge-status-icon::before {
background-color: currentcolor;
mask-image: escape-svg($icon);
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Added mask: no-repeat center / contain;

Comment thread site/src/content/docs/components/badges.mdx Outdated
Comment on lines 306 to +315
<span class="badge-status-icon"></span>
</p>
<p class="badge badge-positive badge-disabled">
<span class="badge-status-icon"></span>
</p>
<p class="badge badge-info badge-disabled">
<span class="badge-status-icon"></span>
</p>
<p class="badge badge-warning badge-disabled">
<span class="badge-status-icon"></span>
Copy link
Copy Markdown
Collaborator

@MaxLardenois MaxLardenois May 22, 2026

Choose a reason for hiding this comment

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

Well, those are disabled so maybe not, then again something is shown... wdyt @hannahiss?

Comment thread site/src/content/docs/components/badges.mdx Outdated
@MaxLardenois
Copy link
Copy Markdown
Collaborator

I changed the styles of the :not(sthg):not(sthg) to :not(sthg, sthg)

Copy link
Copy Markdown
Collaborator

@MaxLardenois MaxLardenois left a comment

Choose a reason for hiding this comment

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

LGTM

Badges - icon are available in four sizes. Add `.badge-xsmall`, `.badge-small`, or `.badge-large` to have the size you want. Default size is medium.

<Example buttonLabel="badges icon sizes" class="d-flex align-items-center gap-large" code={`<p class="badge">
<Example buttonLabel="badges icon sizes" class="d-flex align-items-center gap-large" code={`<p class="badge badge-xsmall">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For small viewports we have an overflow, I propose to only use flex starting at md

Suggested change
<Example buttonLabel="badges icon sizes" class="d-flex align-items-center gap-large" code={`<p class="badge badge-xsmall">
<Example buttonLabel="badges icon sizes" class="d-md-flex align-items-center gap-large" code={`<p class="badge badge-xsmall">

Comment thread .bundlewatch.config.json
{
"path": "./packages/orange/dist/css/ouds-web.css",
"maxSize": "65.5 kB"
"maxSize": "66.75 kB"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Oooff, as they say...

@boosted-bot boosted-bot moved this from In Progress / Draft to Need Lead Dev Review in 🟣 [Orange-Boosted-Bootstrap] PRs Board May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Need Lead Dev Review

Development

Successfully merging this pull request may close these issues.

[OUDS] [Component] Update badge - icon 1.3

4 participants