-
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.9] Refactor Clickable and Pill to use semantic colors #2472
Conversation
🦋 Changeset detectedLatest commit: 1edb69f The changes in this PR will be included in the next version bump. This PR includes changesets to release 15 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: +95 B (+0.1%) Total Size: 97.6 kB
ℹ️ View Unchanged
|
A new build was pushed to Chromatic! 🚀https://5e1bf4b385e3fb0020b7073c-ozmcyymoci.chromatic.com/ Chromatic results:
|
…. Update background from 16% to 8%. Update focus outline to always be `blue` (using global focus color).
@@ -204,153 +210,6 @@ export const Variants: StoryComponentType = { | |||
}, | |||
}; | |||
|
|||
// Test visual styles |
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: This is now being tested in pill-variants.stories.tsx
.
@@ -149,32 +147,4 @@ describe("Pill", () => { | |||
// Assert | |||
expect(await screen.findByText("Hello, world!")).toBeInTheDocument(); | |||
}); | |||
|
|||
test.each` |
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: Also being tested in chromatic directly.
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 (3b05008) 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="PR2472" Packages can also be installed manually by running: pnpm add @khanacademy/wonder-blocks-<package-name>@PR2472 |
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 😄
color: semanticColor.text.inverse, | ||
backgroundColor: semanticColor.surface.overlay, |
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.
Should we use semanticColor.text.disabled
? Would it be helpful to have a different token for the background color since the clickable isn't an overlay?
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.
I didn't want to use text.disabled
because it's being used in the background. I think I'm going to change this to use action.disabled
instead.
title: "Packages / Pill / Pill - All Variants", | ||
component: Pill, | ||
render: (args) => ( | ||
<AllVariants rows={rows} columns={columns}> |
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.
praise: So nice we can use this reusable component for AllVariants 🎉
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2472 +/- ##
============================
============================
Continue to review full report in Codecov by Sentry.
|
…2474) ## Summary: Last PR that migrates the remaining components to use semantic colors. - Added `All Variants` stories to `ActionItem` and `OptionItem`. - Refactored `ActionItem` and `OptionItem` to use semantic colors. - Also refactored `ActionMenu`, `SingleSelect`, `MultiSelect` and `Combobox` to use semantic colors. - Simplified the styles in `ActionMenuOpenerCore` to use a single static StyleSheet instance (instead of generating another one in runtime). ### Implementation plan: 1. #2439 2. #2440 3. #2441 4. #2446 5. #2449 6. #2464 7. #2468 8. #2470 9. #2472 10. Dropdown (current PR) Issue: WB-1814 ## Test plan: Verify that all the dropdown stories are still working as expected. Author: jandrade Reviewers: jandrade, beaesguerra Required Reviewers: Approved By: beaesguerra Checks: ✅ Chromatic - Get results on regular PRs (ubuntu-latest, 20.x), ✅ Lint / Lint (ubuntu-latest, 20.x), ✅ Test / Test (ubuntu-latest, 20.x, 2/2), ✅ Test / Test (ubuntu-latest, 20.x, 1/2), ✅ 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), ⏭️ dependabot, ✅ gerald Pull Request URL: #2474
Summary:
All Variants
story to PillImplementation plan:
Issue: WB-1814
Test plan:
Navigate to the
Clickable
andPill
stories in Storybook and verify that thecolors are correct.