Feature branch pull-request from feature/wb-dark-mode to main#2973
Draft
beaesguerra wants to merge 9 commits intomainfrom
Draft
Feature branch pull-request from feature/wb-dark-mode to main#2973beaesguerra wants to merge 9 commits intomainfrom
feature/wb-dark-mode to main#2973beaesguerra wants to merge 9 commits intomainfrom
Conversation
## 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 detectedLatest commit: 1640604 The changes in this PR will be included in the next version bump. This PR includes changesets to release 31 packages
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 |
Contributor
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 ./dev/tools/deploy_wonder_blocks.js --tag="PR2973"Packages can also be installed manually by running: pnpm add @khanacademy/wonder-blocks-<package-name>@PR2973 |
Contributor
|
Size Change: 0 B Total Size: 121 kB ℹ️ View Unchanged
|
Contributor
A new build was pushed to Chromatic! 🚀https://5e1bf4b385e3fb0020b7073c-hutrldstwi.chromatic.com/ Chromatic results:
|
## 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This PR includes the following commits:
Issue: WB-2163
Test plan: