Skip to content

Wonder Blocks: Remove deprecated semanticColor.text and semanticColor.border token instances #2627

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

Merged
merged 4 commits into from
Jun 24, 2025

Conversation

jandrade
Copy link
Member

@jandrade jandrade commented Jun 19, 2025

Summary:

Updates styles to use semanticColor.core WB tokens instead of the now
deprecated sc.text and sc.border tokens, which were previously used
for text and border colors.

This change is part of the ongoing effort to standardize our new core semantic
color tokens across repositories, so that we can have a consistent approach
with Design specs.

Docs: https://khan.github.io/wonder-blocks/?path=/docs/foundations-using-color--docs#core

Issue: "none"

Test plan:

Verify that the following components render without any visual changes:

  • Free response editor
BEFORE AFTER
Screenshot 2025-06-19 at 3 37 50 PM Screenshot 2025-06-19 at 3 38 13 PM
  • Free response widget
BEFORE AFTER
Screenshot 2025-06-19 at 3 39 54 PM Screenshot 2025-06-19 at 3 40 02 PM

Juan Andrade added 3 commits June 19, 2025 15:40
@jandrade jandrade self-assigned this Jun 19, 2025
Copy link
Contributor

github-actions bot commented Jun 19, 2025

Size Change: +21 B (0%)

Total Size: 472 kB

Filename Size Change
packages/perseus-editor/dist/es/index.js 91.1 kB +9 B (+0.01%)
packages/perseus/dist/es/index.js 200 kB +12 B (+0.01%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 20.7 kB
packages/keypad-context/dist/es/index.js 1 kB
packages/kmath/dist/es/index.js 5.98 kB
packages/math-input/dist/es/index.js 98.6 kB
packages/math-input/dist/es/strings.js 1.61 kB
packages/perseus-core/dist/es/index.js 20.4 kB
packages/perseus-linter/dist/es/index.js 7.14 kB
packages/perseus-score/dist/es/index.js 9.23 kB
packages/perseus-utils/dist/es/index.js 403 B
packages/perseus/dist/es/strings.js 7.56 kB
packages/pure-markdown/dist/es/index.js 1.22 kB
packages/simple-markdown/dist/es/index.js 6.72 kB

compressed-size-action

Copy link
Contributor

github-actions bot commented Jun 19, 2025

npm Snapshot: Published

Good news!! We've packaged up the latest commit from this PR (ec8dcd2) and published it to npm. You
can install it using the tag PR2627.

Example:

pnpm add @khanacademy/perseus@PR2627

If you are working in Khan Academy's frontend, you can run the below command.

./tools/bump_perseus_version.js -t PR2627

If you are working in Khan Academy's webapp, you can run the below command.

./dev/tools/bump_perseus_version.js -s n -t PR2627

@jandrade jandrade requested a review from a team June 19, 2025 19:57
Copy link
Collaborator

@jeremywiebe jeremywiebe left a comment

Choose a reason for hiding this comment

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

I pushed one commit to utils/extract-css.js (a tool that Mark is building to extract aphrodite styles to CSS modules), just to keep things current. Can you double-check I mapped them correctly?

I don't see any other instances of the deprecated semanticColor symbols now.

Comment on lines +32 to +35
"#21242c": "--wb-semanticColor-core-foreground-neutral-strong",
"#5f6167": "--wb-semanticColor-core-foreground-neutral-default",
"#b8b9bb": "--wb-semanticColor-core-foreground-disabled-default",
"#ffffff": "--wb-semanticColor-core-foreground-inverse-strong",
Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense!

@jandrade jandrade merged commit 4788af3 into main Jun 24, 2025
8 checks passed
@jandrade jandrade deleted the wb-rm-border-text branch June 24, 2025 11:06
handeyeco pushed a commit that referenced this pull request Jun 24, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @khanacademy/perseus@65.3.4

### Patch Changes

- [#2627](#2627)
[`4788af376`](4788af3)
Thanks [@jandrade](https://github.com/jandrade)! - Updates styles to use
`semanticColor.core` WB tokens instead of the now deprecated sc.text and
sc.border tokens

## @khanacademy/perseus-editor@25.0.4

### Patch Changes

- [#2627](#2627)
[`4788af376`](4788af3)
Thanks [@jandrade](https://github.com/jandrade)! - Updates styles to use
`semanticColor.core` WB tokens instead of the now deprecated sc.text and
sc.border tokens

- Updated dependencies
\[[`4788af376`](4788af3)]:
    -   @khanacademy/perseus@65.3.4

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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