Skip to content

[hack25] EXPERIMENT: Create initial transform to convert color to semanticColor.core tokens#2847

Draft
jandrade wants to merge 17 commits intomainfrom
codemod-dark
Draft

[hack25] EXPERIMENT: Create initial transform to convert color to semanticColor.core tokens#2847
jandrade wants to merge 17 commits intomainfrom
codemod-dark

Conversation

@jandrade
Copy link
Member

@jandrade jandrade commented Nov 3, 2025

Summary:

This codemod adds an initial transform to convert color tokens to
semanticColor.core tokens in our codebase. The transform scans through
the code files and replaces instances of color tokens with their
mappings.

Issue: "none"

Test plan:

Wait until the Snapshot release job passes.

Then run the codemod locally using the following command:

npx @khanacademy/wb-codemod@SNAPSHOT_VERSION -t migrate-color-to-semantic-color __docs__/

Verify the output to ensure that color tokens have been correctly replaced
with semanticColor.core tokens according to the defined mappings.

@jandrade jandrade self-assigned this Nov 3, 2025
@changeset-bot
Copy link

changeset-bot bot commented Nov 3, 2025

🦋 Changeset detected

Latest commit: 9655612

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

This PR includes changesets to release 1 package
Name Type
@khanacademy/wb-codemod Minor

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

@khan-actions-bot khan-actions-bot requested a review from a team November 3, 2025 17:33
@khan-actions-bot
Copy link
Contributor

khan-actions-bot commented Nov 3, 2025

Gerald

Required Reviewers
  • @Khan/wonder-blocks for changes to package.json, pnpm-lock.yaml, pnpm-workspace.yaml, .changeset/slow-camels-notice.md, wb-codemod/package.json, wb-codemod/bin/cli.js, wb-codemod/transforms/migrate-color-to-semantic-color.ts, wb-codemod/transforms/__tests__/migrate-color-to-semantic-color.test.ts

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

Size Change: 0 B

Total Size: 116 kB

ℹ️ View Unchanged
Filename Size
packages/wonder-blocks-accordion/dist/es/index.js 3 kB
packages/wonder-blocks-announcer/dist/es/index.js 1.74 kB
packages/wonder-blocks-badge/dist/es/index.js 2.02 kB
packages/wonder-blocks-banner/dist/es/index.js 2.01 kB
packages/wonder-blocks-birthday-picker/dist/es/index.js 1.91 kB
packages/wonder-blocks-breadcrumbs/dist/es/index.js 755 B
packages/wonder-blocks-button/dist/es/index.js 4.25 kB
packages/wonder-blocks-card/dist/es/index.js 1.08 kB
packages/wonder-blocks-cell/dist/es/index.js 2.18 kB
packages/wonder-blocks-clickable/dist/es/index.js 2.6 kB
packages/wonder-blocks-core/dist/es/index.js 2.59 kB
packages/wonder-blocks-data/dist/es/index.js 5.48 kB
packages/wonder-blocks-date-picker/dist/es/index.js 6.38 kB
packages/wonder-blocks-dropdown/dist/es/index.js 19.5 kB
packages/wonder-blocks-form/dist/es/index.js 6.3 kB
packages/wonder-blocks-grid/dist/es/index.js 1.24 kB
packages/wonder-blocks-icon-button/dist/es/index.js 4 kB
packages/wonder-blocks-icon/dist/es/index.js 1.91 kB
packages/wonder-blocks-labeled-field/dist/es/index.js 3.47 kB
packages/wonder-blocks-layout/dist/es/index.js 1.63 kB
packages/wonder-blocks-link/dist/es/index.js 1.54 kB
packages/wonder-blocks-modal/dist/es/index.js 7.21 kB
packages/wonder-blocks-pill/dist/es/index.js 1.31 kB
packages/wonder-blocks-popover/dist/es/index.js 4.32 kB
packages/wonder-blocks-progress-spinner/dist/es/index.js 1.48 kB
packages/wonder-blocks-search-field/dist/es/index.js 1.1 kB
packages/wonder-blocks-styles/dist/es/index.js 464 B
packages/wonder-blocks-switch/dist/es/index.js 1.55 kB
packages/wonder-blocks-tabs/dist/es/index.js 3.8 kB
packages/wonder-blocks-testing-core/dist/es/index.js 3.25 kB
packages/wonder-blocks-testing/dist/es/index.js 978 B
packages/wonder-blocks-theming/dist/es/index.js 384 B
packages/wonder-blocks-timing/dist/es/index.js 1.37 kB
packages/wonder-blocks-tokens/dist/es/index.js 4.95 kB
packages/wonder-blocks-toolbar/dist/es/index.js 906 B
packages/wonder-blocks-tooltip/dist/es/index.js 6.02 kB
packages/wonder-blocks-typography/dist/es/index.js 1.57 kB

compressed-size-action

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

npm Snapshot: Published

🎉 Good news!! We've packaged up the latest commit from this PR (0e79dab) and published all packages with changesets to npm.

You can install the packages in frontend by running:

./dev/tools/deploy_wonder_blocks.js --tag="PR2847"

Packages can also be installed manually by running:

pnpm add @khanacademy/wonder-blocks-<package-name>@PR2847

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

A new build was pushed to Chromatic! 🚀

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

Chromatic results:

Metric Total
Captured snapshots 0
Tests with visual changes 0
Total stories 774
Inherited (not captured) snapshots [TurboSnap] 456
Tests on the build 456

@jandrade jandrade removed the request for review from a team November 14, 2025 16:07
Base automatically changed from feature/dark-mode to main November 20, 2025 16:32
@jandrade jandrade closed this Dec 4, 2025
@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (a6665ac) to head (f8e6d3a).
⚠️ Report is 69 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@     Coverage Diff      @@
##   main   #2847   +/-   ##
============================
============================

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6665ac...f8e6d3a. Read the comment docs.

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

@jandrade jandrade reopened this Jan 30, 2026
@jandrade jandrade marked this pull request as draft January 30, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants