-
Notifications
You must be signed in to change notification settings - Fork 10
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-1814.4] Refactor Accordion, Banner, BirthdayPicker to use semantic colors #2446
Conversation
🦋 Changeset detectedLatest commit: 79e48c0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
Size Change: +44 B (+0.04%) Total Size: 98.3 kB
ℹ️ View Unchanged
|
A new build was pushed to Chromatic! 🚀https://5e1bf4b385e3fb0020b7073c-ntstvvkenb.chromatic.com/ Chromatic results:
|
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
npm Snapshot: Published🎉 Good news!! We've packaged up the latest commit from this PR (fe27e7d) and published all packages with changesets to npm. You can install the packages in webapp by running: ./services/static/dev/tools/deploy_wonder_blocks.js --tag="PR2446" Packages can also be installed manually by running: yarn add @khanacademy/wonder-blocks-<package-name>@PR2446 |
// Provide basic, default focus styles on older browsers (e.g. | ||
// Safari 14) | ||
":focus": { | ||
boxShadow: `0 0 0 2px ${tokens.color.blue}`, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: We now support Safari v14+, so I dropped this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Left a non-blocking question around the banner background color!
@@ -313,7 +313,7 @@ const styles = StyleSheet.create({ | |||
// the base color needs to be hard-coded as white for the | |||
// intended pastel background color to show up correctly | |||
// on dark backgrounds. | |||
backgroundColor: color.white, | |||
backgroundColor: semanticColor.surface.primary, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh interesting, we don't use the semantic background colors for the background of the banner (we rely on opacity). Do we want to use the semantic background tokens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question! tbh I'm not sure how this will be handled with the Polaris theme. I'm going to revisit this once we add theming support to banner. I'll add a TODO comment to make sure we track this.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2446 +/- ##
============================
============================
Continue to review full report in Codecov by Sentry.
|
## Summary: Next step is to refactor the `IconButton` component to use semantic colors. Besides the migration, this PR also includes the following changes: - Reworked the theme structure to make it closer to the semanticColor structure. - Moved all the color-related CSS properties to a separate function (`getStylesByKind`). - Added `border` to all the states to prepare the work for Polaris as these icon buttons will look similar to the Button ones. ### Implementation plan: 1. #2439 2. #2440 3. #2441 4. #2446 5. IconButton (current PR) 6. Clickable, Link 7. Modal 8. Popover, Tooltip 9. Pill, Toolbar Issue: WB-1814 ## Test plan: Verify that the Chromatic snapshots are unchanged. URL: `/?path=/story/packages-iconbutton-all-variants--default` Author: jandrade Reviewers: jandrade, marcysutton, beaesguerra Required Reviewers: Approved By: marcysutton, beaesguerra Checks: ✅ Chromatic - Get results on regular PRs (ubuntu-latest, 20.x), ✅ Test / Test (ubuntu-latest, 20.x, 2/2), ✅ Test / Test (ubuntu-latest, 20.x, 1/2), ✅ Lint / Lint (ubuntu-latest, 20.x), ✅ Check build sizes (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Chromatic - Build and test on regular PRs / chromatic (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ⏭️ Chromatic - Skip on Release PR (changesets), ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 20.x), ✅ gerald, ⏭️ dependabot Pull Request URL: #2449
Summary:
Next step is to refactor the
Accordion
,Banner
, andBirthdayPicker
components to use semantic colors.
Implementation plan:
Issue: WB-1814
Test plan:
Verify that the Chromatic snapshots are unchanged.