Skip to content

chore: Alternative style api for badge - #5120

Closed
pan-kot wants to merge 1 commit into
mainfrom
chore-badge-style-api-alt
Closed

pan-kot wants to merge 1 commit into
mainfrom
chore-badge-style-api-alt

Conversation

@pan-kot

@pan-kot pan-kot commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Description

Course correction for Style API v2 (design doc RsrNx38C0132): Badge no longer exposes style tokens. Its root slot now documents eligible CSS properties (color, background, border, border-radius, padding, font-family, font-size, font-weight) that consumers set directly, with the styling.override mixin raising specificity. The component CSS goes back to plain design-token values; only the docs annotation changes.

Depends on: cloudscape-design/component-toolkit#264

How has this been tested?

The PR deliberately does not include tests for the generated mixins: we will cover them later with a snapshot test - similar to style docs. However, during development these tests cause git conflicts when multiple components are added in parallel.

The generated mixins can be inspected in ./lib/components/styling

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov

codecov Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.71%. Comparing base (a8c4713) to head (38478ff).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5120   +/-   ##
=======================================
  Coverage   97.70%   97.71%           
=======================================
  Files         990      991    +1     
  Lines       31818    31858   +40     
  Branches    11753    11770   +17     
=======================================
+ Hits        31089    31130   +41     
- Misses        683      721   +38     
+ Partials       46        7   -39     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vvaliyev
vvaliyev added this pull request to the merge queue Oct 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 14, 2026

@gethinwebster gethinwebster left a comment

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.

Actually, I've looked into this approach in more detail and I think it's very risk-prone, I think it needs more discussion

@pan-kot
pan-kot marked this pull request as draft October 19, 2026 08:51
@pan-kot
pan-kot force-pushed the chore-badge-style-api-alt branch from 38478ff to ecae700 Compare October 20, 2026 10:03
@pan-kot

pan-kot commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

Closed in favour of #5165

@pan-kot pan-kot closed this Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants