Repository navigation
port card border radius changes from gamut to sks-gamut - #74
Draft
LinKCoding wants to merge 2 commits into
Draft
LinKCoding wants to merge 2 commits into
LinKCoding wants to merge 2 commits into
Conversation
@skillsoft/eslint-plugin-gamut
@skillsoft/gamut
@skillsoft/gamut-agent-tools
@skillsoft/gamut-codemods
@skillsoft/gamut-icons
@skillsoft/gamut-illustrations
@skillsoft/gamut-patterns
@skillsoft/gamut-styles
@skillsoft/gamut-tests
@skillsoft/variance
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #74 +/- ##
=======================================
Coverage ? 79.66%
=======================================
Files ? 296
Lines ? 6644
Branches ? 2269
=======================================
Hits ? 5293
Misses ? 1342
Partials ? 9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Overview
This change is ported from changes made in gamut, see:
Codecademy/gamut#3441
Card hover animations now use the border radius of the active theme, so switching themes updates the radius instead of keeping the one computed from the static core scale.
useCardElevation(packages/gamut/src/Card/styles.tsx) takes the Card'sborderRadiustoken and readsborderRadiifromuseTheme(). String tokens resolve through the theme's scale, and other strings pass through. Responsive or function values resolve toundefined, because framer-motion needs a concrete value to animate.Card(packages/gamut/src/Card/index.tsx) passes the token to the hook and drops its own static lookup and theborderRadiiimport.Card.test.tsxchecks thatborderRadiusresolves from the active theme forcoreTheme,percipioThemeandlxStudioTheme.PR Checklist
Testing Instructions
Don't make me tap the sign.
mdis4px).borderRadiustoken (e.g.lg,xl) on an interactive Card and repeat the theme switch. Check that the radius updates each time.patternLeft,patternRightandoutlineshadow variants on hover. The radius should stay correct while the shadow animates.yarn jest packages/gamut/src/Cardand confirm the tests pass.PR Links and Envs