Skip to content

Feature branch pull-request from feature/wb-dark-mode to main#2973

Draft
beaesguerra wants to merge 9 commits intomainfrom
feature/wb-dark-mode
Draft

Feature branch pull-request from feature/wb-dark-mode to main#2973
beaesguerra wants to merge 9 commits intomainfrom
feature/wb-dark-mode

Conversation

@beaesguerra
Copy link
Copy Markdown
Member

@beaesguerra beaesguerra commented Feb 23, 2026

Summary:

This PR includes the following commits:

Issue: WB-2163

Test plan:

## Summary:

Updating our Storybook config so that it can support dark themes.

To simplify theming in Storybook, we remove the custom overriding styles we had so we can rely on the built-in defaults provided by Storybook.

It also sets up the SB control for the SYL Dark theme. Note: the syl-dark theme is not yet implemented so the components will continue to look the same. The main difference is that the Storybook environment is following Storybook's built-in dark theme!

Issue: WB-2163

## Test plan:

Confirm that Storybook looks okay when it is in both light and dark modes. To test the light mode, pick the default or thunderblocks theme. For dark mode, pick the `SYL Dark theme`

| Light | Dark |
|---|---|
| <img width="1508" height="997" alt="image" src="https://github.com/user-attachments/assets/5a66447f-057e-48c9-ac37-8123a0a15808" /> | <img width="1503" height="990" alt="image" src="https://github.com/user-attachments/assets/14b70bea-2ac3-49e2-9dc0-ab7c49e26927" /> |

Author: beaesguerra

Reviewers: beaesguerra, jandrade

Required Reviewers:

Approved By: jandrade

Checks: ✅ 13 checks were successful, ⏭️  3 checks have been skipped

Pull Request URL: #2953
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 23, 2026

🦋 Changeset detected

Latest commit: 1640604

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

This PR includes changesets to release 31 packages
Name Type
@khanacademy/wonder-blocks-labeled-field Minor
@khanacademy/wonder-blocks-icon-button Minor
@khanacademy/wonder-blocks-dropdown Minor
@khanacademy/wonder-blocks-theming Minor
@khanacademy/wonder-blocks-banner Minor
@khanacademy/wonder-blocks-button Minor
@khanacademy/wonder-blocks-switch Minor
@khanacademy/wonder-blocks-tokens Minor
@khanacademy/wonder-blocks-modal Minor
@khanacademy/wonder-blocks-cell Minor
@khanacademy/wonder-blocks-form Minor
@khanacademy/wonder-blocks-link Minor
@khanacademy/wonder-blocks-card Patch
@khanacademy/wonder-blocks-popover Patch
@khanacademy/wonder-blocks-search-field Patch
@khanacademy/wonder-blocks-birthday-picker Patch
@khanacademy/wonder-blocks-tabs Patch
@khanacademy/wonder-blocks-accordion Patch
@khanacademy/wonder-blocks-badge Patch
@khanacademy/wonder-blocks-breadcrumbs Patch
@khanacademy/wonder-blocks-clickable Patch
@khanacademy/wonder-blocks-date-picker Patch
@khanacademy/wonder-blocks-grid Patch
@khanacademy/wonder-blocks-icon Patch
@khanacademy/wonder-blocks-layout Patch
@khanacademy/wonder-blocks-pill Patch
@khanacademy/wonder-blocks-progress-spinner Patch
@khanacademy/wonder-blocks-styles Patch
@khanacademy/wonder-blocks-toolbar Patch
@khanacademy/wonder-blocks-tooltip Patch
@khanacademy/wonder-blocks-typography 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 23, 2026

npm Snapshot: Published

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

You can install the packages in frontend by running:

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

Packages can also be installed manually by running:

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 23, 2026

Size Change: 0 B

Total Size: 121 kB

ℹ️ View Unchanged
Filename Size
packages/wonder-blocks-accordion/dist/es/index.js 3 kB
packages/wonder-blocks-announcer/dist/es/index.js 2.43 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.28 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 8.06 kB
packages/wonder-blocks-dropdown/dist/es/index.js 19.7 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.01 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.53 kB
packages/wonder-blocks-modal/dist/es/index.js 7.36 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 5.57 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 5.18 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
Copy Markdown
Contributor

github-actions bot commented Feb 23, 2026

A new build was pushed to Chromatic! 🚀

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

Chromatic results:

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

beaesguerra and others added 8 commits February 23, 2026 16:38
## Summary:

- Setting up the syl-dark tokens:
  - As a baseline, used the tokens set up in #2872
  - Used an AI agent to compare the syl-dark tokens with an exported json of the Figma variables for SYL Dark and updated token values to make sure it matches

- Set up base for component level tokens based on the `thunderblocks` theme

- Update Storybook config so that components work with the syl-dark theme

Issue: WB-2165

## Test plan:

Review semantic color tokens (note: there will may be changes to the tokens as we review and iterate on the components) `?path=/docs/packages-tokens-semantic-color--docs&globals=theme:syl-dark`

Review that components with component level tokens have similar styles to TB (example: Button in syl-dark should look more like the thunderblocks theme than the classic default theme)

## Implementation Plan

- Set up tooling ([SB config](#2953) and [catalog](#2950))
- Make sure primitives and core tokens are up to date ([parallel set of changes](#2970) in progress)
- (this PR) Set up syl-dark tokens
- Review and iterate on components individually (will enable syl-dark snapshots for each components in this step)

Author: beaesguerra

Reviewers: beaesguerra, jandrade

Required Reviewers:

Approved By: jandrade

Checks: ✅ 13 checks were successful, ⏭️  3 checks have been skipped

Pull Request URL: #2974
## Summary:

Created a ColorSwatch component for docs in Storybook so colors with transparency can be seen 

Issue: WB-2241

## Test plan:

Confirm that docs for semantic color tokens with transparency show the dotted background across the different themes (`?path=/docs/packages-tokens-semantic-color--docs`)


| Classic | Thunderblocks | SYL Dark | 
| --- | --- | --- |
| <img width="982" height="255" alt="Screenshot 2026-03-09 at 4 48 28 PM" src="https://github.com/user-attachments/assets/adf5ef11-21a9-405c-979c-01d42f4feaac" /> | <img width="979" height="239" alt="image" src="https://github.com/user-attachments/assets/dc25381b-ce4c-4f0a-87cf-dfc082837f24" /> | <img width="981" height="253" alt="image" src="https://github.com/user-attachments/assets/0585755b-ac60-4047-b184-7ce2f95a098a" /> |

Author: beaesguerra

Reviewers: beaesguerra, jandrade

Required Reviewers:

Approved By: jandrade

Checks: ✅ 13 checks were successful, ⏭️  3 checks have been skipped

Pull Request URL: #2984
## Summary:

Setting the font color in the Storybook environment using a token so it works with different themes. Note: We will be setting the font color at the global level in apps/storybook environments since this is how it is currently done. 

For reference, we would use the css variable token in [base-page-styles.css](https://github.com/Khan/frontend/blob/78c764bab2b54535242a2aaf7ce0f3652cfe34b8/libs/app-shell/src/styles/base-page-styles.css#L18) in `frontend` (similar to what we did in the [hackathon](https://github.com/Khan/frontend/pull/5123/changes#diff-f098b08ecc7bbe0e32ed84648793d2806edc0a08c971badb39437123579616ceR18))

Note: I explored setting the font color at the typography component level in: #2982 . (TLDR: setting the color at the typography component level will cause regressions because some things are relying on the inherited color behaviour. For now, we'll stick with how the font color is currently set up)

Issue: WB-2166

## Test plan:

- Review the typography stories and snapshots in the `syl-dark` theme
  - Typography in the catalog:`?path=/story/catalog--typography-and-icons&globals=theme:syl-dark`
  - Typography components: `?path=/docs/packages-typography--docs&globals=theme:syl-dark`
  - Typography tokens: `?path=/docs/packages-tokens-typography--docs&globals=theme:syl-dark`

Author: beaesguerra

Reviewers: beaesguerra, claude[bot], jandrade

Required Reviewers:

Approved By: jandrade

Checks: ✅ 13 checks were successful, ⏭️  3 checks have been skipped

Pull Request URL: #2983
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.

1 participant