Skip to content
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

[WB-1853] Button: Refactor theme to support semanticColor tokens #2431

Draft
wants to merge 4 commits into
base: wb-semantic-color-refactor
Choose a base branch
from

Conversation

jandrade
Copy link
Member

Summary:

Now that we have semanticColor tokens available, this PR is responsible for
refactoring the existing Button code to use these tokens instead of the
color primitive tokens. Also, it modifies the theme structure to follow
closer the semantic color tokens structure.

Also added a light.destructive.disabled variant to the Dark story as we didn't
include a snapshot for it.

Issue: WB-1853

Test plan:

Navigate to /?path=/docs/packages-button--docs and verify that the button
hasn't changed.

@jandrade jandrade self-assigned this Jan 16, 2025
Copy link

changeset-bot bot commented Jan 16, 2025

🦋 Changeset detected

Latest commit: 0aa3431

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

This PR includes changesets to release 2 packages
Name Type
@khanacademy/wonder-blocks-button Patch
@khanacademy/wonder-blocks-banner Patch

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

@jandrade jandrade changed the title [WB-1853] [WB-1853] Button: Refactor theme to support semanticColor tokens Jan 16, 2025
Copy link
Contributor

github-actions bot commented Jan 16, 2025

A new build was pushed to Chromatic! 🚀

https://5e1bf4b385e3fb0020b7073c-mkzzciueot.chromatic.com/

Chromatic results:

Metric Total
Captured snapshots 340
Tests with visual changes 6
Total stories 517
Inherited (not captured) snapshots [TurboSnap] 38
Tests on the build 378

Copy link
Contributor

github-actions bot commented Jan 16, 2025

Size Change: +296 B (+0.31%)

Total Size: 96.9 kB

Filename Size Change
packages/wonder-blocks-button/dist/es/index.js 4.41 kB +296 B (+7.19%) 🔍
ℹ️ View Unchanged
Filename Size
packages/wonder-blocks-accordion/dist/es/index.js 3.77 kB
packages/wonder-blocks-banner/dist/es/index.js 1.53 kB
packages/wonder-blocks-birthday-picker/dist/es/index.js 1.77 kB
packages/wonder-blocks-breadcrumbs/dist/es/index.js 887 B
packages/wonder-blocks-cell/dist/es/index.js 2.01 kB
packages/wonder-blocks-clickable/dist/es/index.js 3.06 kB
packages/wonder-blocks-core/dist/es/index.js 2.9 kB
packages/wonder-blocks-data/dist/es/index.js 6.24 kB
packages/wonder-blocks-dropdown/dist/es/index.js 19.1 kB
packages/wonder-blocks-form/dist/es/index.js 6.2 kB
packages/wonder-blocks-grid/dist/es/index.js 1.36 kB
packages/wonder-blocks-icon-button/dist/es/index.js 2.95 kB
packages/wonder-blocks-icon/dist/es/index.js 871 B
packages/wonder-blocks-labeled-field/dist/es/index.js 72 B
packages/wonder-blocks-layout/dist/es/index.js 1.82 kB
packages/wonder-blocks-link/dist/es/index.js 2.28 kB
packages/wonder-blocks-modal/dist/es/index.js 5.42 kB
packages/wonder-blocks-pill/dist/es/index.js 1.65 kB
packages/wonder-blocks-popover/dist/es/index.js 4.85 kB
packages/wonder-blocks-progress-spinner/dist/es/index.js 1.52 kB
packages/wonder-blocks-search-field/dist/es/index.js 1.36 kB
packages/wonder-blocks-switch/dist/es/index.js 1.92 kB
packages/wonder-blocks-testing-core/dist/es/index.js 3.74 kB
packages/wonder-blocks-testing/dist/es/index.js 1.07 kB
packages/wonder-blocks-theming/dist/es/index.js 693 B
packages/wonder-blocks-timing/dist/es/index.js 1.8 kB
packages/wonder-blocks-tokens/dist/es/index.js 2.51 kB
packages/wonder-blocks-toolbar/dist/es/index.js 905 B
packages/wonder-blocks-tooltip/dist/es/index.js 6.99 kB
packages/wonder-blocks-typography/dist/es/index.js 1.23 kB

compressed-size-action

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.

1 participant