Skip to content

Update badge icon 1.3.0#3576

Open
hannahiss wants to merge 15 commits into
tokenator-update-tokens-20260505093858from
update-badge-icon-1.3.0
Open

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

Conversation

@hannahiss

@hannahiss hannahiss commented May 13, 2026

Copy link
Copy Markdown
Member

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

netlify Bot commented May 13, 2026

Copy link
Copy Markdown

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

netlify Bot commented May 13, 2026

Copy link
Copy Markdown

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit 67dee85
🔍 Latest deploy log https://app.netlify.com/projects/boosted/deploys/6a227ce3c6e3190008cdfd2c
😎 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

Copilot AI left a comment

Copy link
Copy Markdown

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 thread scss/_badges.scss
Comment thread site/src/content/docs/components/badges.mdx Outdated
Comment thread site/src/content/docs/components/badges.mdx
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)

@MaxLardenois MaxLardenois left a comment

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.

LGTM

Comment thread site/src/content/docs/components/badges.mdx Outdated
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
@hannahiss hannahiss force-pushed the update-badge-icon-1.3.0 branch 3 times, most recently from 242709f to d85c591 Compare May 27, 2026 17:42
@hannahiss hannahiss marked this pull request as ready for review May 28, 2026 07:39
@boosted-bot boosted-bot moved this from Need Lead Dev Review to Need Dev Review in 🟣 [Orange-Boosted-Bootstrap] PRs Board May 28, 2026
@jerome-regnier

Copy link
Copy Markdown
Member

Comment thread scss/_badges.scss
@@ -1,46 +1,107 @@
//
// Mixins

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We used to have the mixins in a separate file in scss/mixins, don't know if we have to move it or not.

Comment thread scss/_badges.scss Outdated
&.badge-info {
--#{$prefix}badge-color: #{$ouds-color-content-on-status-info-emphasized};
--#{$prefix}badge-background-color: #{$ouds-color-surface-status-info-emphasized};
&.badge-positive:not(.badge-neutral, .badge-accent) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think where there is a variant class, we can safely remove :not(...)

Comment thread scss/_badges.scss Outdated
mask-image: escape-svg(var(--#{$prefix}badge-warning-icon));
}
}
&.badge.badge-disabled { // Artificially increase the selector's weight to overwrite colors when badge is disabled

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If above works, we can remove .badge in here


// Badge
// badge-icon tick-confirmation-fill v1.6
$badge-icon-positive: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M12 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0Zm5.878 6.363a1.054 1.054 0 0 0-1.485.142l-6.902 8.363-1.75-3.709a1.055 1.055 0 1 0-1.908.901l2.46 5.21a1.055 1.055 0 0 0 1.767.221l7.96-9.643a1.053 1.053 0 0 0-.142-1.485Z' clip-rule='evenodd'/></g><defs><clipPath id='a'><path fill='#fff' d='M0 0h24v24H0z'/></clipPath></defs></svg>") !default;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't understand why these icons are filled, we could have only the inside of them, here they are semi transparent, so it might lead to issues on a11y side, it's heavier, it makes us change the behavior of the badge ... not convinced, but I'd like to hear why this choice has been made on design side.

Comment thread scss/_badges.scss
height: var(--#{$prefix}badge-size);
padding: 0;

.badge-status-icon {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could be outside of .badge-icon to lesser specificity

Comment thread scss/_badges.scss
.badge-xsmall:not(.badge-count) {
--#{$prefix}badge-size: #{px-to-rem($ouds-badge-size-xsmall)};

&:not(:has(.badge-status-icon)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It feels tricky to me, I'd rather set it for everyone and remove the padding on .badge-icon:has(.badge-status-icon)

Comment thread scss/_badges.scss
}

.badge-icon {
font-size: calc(#{$ouds-badge-size-xsmall} - (2 * var(--#{$prefix}badge-padding-icon-xsmall)));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We could probably set a CSS var in this case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Need Dev Review

Development

Successfully merging this pull request may close these issues.

[OUDS] [Component] Update badge - icon 1.3

7 participants