Skip to content
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

Fix active state styling for tertiary button #2259

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

beaesguerra
Copy link
Member

@beaesguerra beaesguerra commented Jun 24, 2024

Summary:

Use the same theme token for the height of the underline on the active state of the tertiary button so that the hover and active styling are consistent

Issue: WB-1025

Test plan:

  • Confirm that the hover and active state of the tertiary button have a consistent underline thickness

Screen Recording:

Before & After

tertiary-button-states.mov

@beaesguerra beaesguerra self-assigned this Jun 24, 2024
Copy link

changeset-bot bot commented Jun 24, 2024

🦋 Changeset detected

Latest commit: 7306025

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

This PR includes changesets to release 2 packages
Name Type
@khanacademy/wonder-blocks-button Patch
@khanacademy/wonder-blocks-banner 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

@@ -495,7 +495,7 @@ export const _generateStyles = (
active: {
color: light ? fadedColor : activeColor,
":after": {
height: 1,
height: theme.size.height.tertiaryHover,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

github-actions bot commented Jun 24, 2024

Size Change: -1 B (0%)

Total Size: 96.9 kB

Filename Size Change
packages/wonder-blocks-button/dist/es/index.js 4.28 kB -1 B (-0.02%)
ℹ️ View Unchanged
Filename Size
packages/wonder-blocks-accordion/dist/es/index.js 3.78 kB
packages/wonder-blocks-banner/dist/es/index.js 1.52 kB
packages/wonder-blocks-birthday-picker/dist/es/index.js 1.72 kB
packages/wonder-blocks-breadcrumbs/dist/es/index.js 1.13 kB
packages/wonder-blocks-cell/dist/es/index.js 2.25 kB
packages/wonder-blocks-clickable/dist/es/index.js 3.3 kB
packages/wonder-blocks-core/dist/es/index.js 3.66 kB
packages/wonder-blocks-data/dist/es/index.js 6.34 kB
packages/wonder-blocks-dropdown/dist/es/index.js 14.2 kB
packages/wonder-blocks-form/dist/es/index.js 5.34 kB
packages/wonder-blocks-grid/dist/es/index.js 1.36 kB
packages/wonder-blocks-i18n/dist/es/index.js 4.6 kB
packages/wonder-blocks-icon-button/dist/es/index.js 3.23 kB
packages/wonder-blocks-icon/dist/es/index.js 1.06 kB
packages/wonder-blocks-labeled-field/dist/es/index.js 72 B
packages/wonder-blocks-layout/dist/es/index.js 1.94 kB
packages/wonder-blocks-link/dist/es/index.js 2.53 kB
packages/wonder-blocks-modal/dist/es/index.js 5.51 kB
packages/wonder-blocks-pill/dist/es/index.js 1.64 kB
packages/wonder-blocks-popover/dist/es/index.js 4.85 kB
packages/wonder-blocks-progress-spinner/dist/es/index.js 1.52 kB
packages/wonder-blocks-search-field/dist/es/index.js 1.54 kB
packages/wonder-blocks-switch/dist/es/index.js 2.09 kB
packages/wonder-blocks-testing/dist/es/index.js 3.94 kB
packages/wonder-blocks-theming/dist/es/index.js 693 B
packages/wonder-blocks-timing/dist/es/index.js 1.8 kB
packages/wonder-blocks-tokens/dist/es/index.js 1.74 kB
packages/wonder-blocks-toolbar/dist/es/index.js 855 B
packages/wonder-blocks-tooltip/dist/es/index.js 6.91 kB
packages/wonder-blocks-typography/dist/es/index.js 1.48 kB

compressed-size-action

Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.58%. Comparing base (f099cf8) to head (7306025).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2259      +/-   ##
==========================================
+ Coverage   94.25%   95.58%   +1.33%     
==========================================
  Files         248      248              
  Lines       29395    29395              
  Branches     2416     2475      +59     
==========================================
+ Hits        27706    28097     +391     
+ Misses       1644     1281     -363     
+ Partials       45       17      -28     
Files Coverage Δ
...onder-blocks-button/src/components/button-core.tsx 92.27% <100.00%> (+12.93%) ⬆️

... and 43 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f099cf8...7306025. Read the comment docs.

…e state of the tertiary button so that the hover and active styling are consistent
@beaesguerra beaesguerra force-pushed the update-tertiary-button-active-state branch from e7b8ce2 to 7306025 Compare June 24, 2024 22:21
Copy link
Contributor

A new build was pushed to Chromatic! 🚀

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

Chromatic results:

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

@beaesguerra beaesguerra marked this pull request as ready for review June 24, 2024 22:38
@khan-actions-bot khan-actions-bot requested a review from a team June 24, 2024 22:38
@khan-actions-bot
Copy link
Contributor

Gerald

Required Reviewers
  • @Khan/wonder-blocks for changes to .changeset/light-swans-thank.md, __docs__/wonder-blocks-button/button.stories.tsx, packages/wonder-blocks-button/src/components/button-core.tsx

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

Copy link
Contributor

npm Snapshot: Published

🎉 Good news!! We've packaged up the latest commit from this PR (4d8d453) 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="PR2259"

Packages can also be installed manually by running:

yarn add @khanacademy/wonder-blocks-<package-name>@PR2259

Copy link
Member

@jandrade jandrade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! :shipit:

@beaesguerra beaesguerra merged commit 04a25ff into main Jun 25, 2024
25 checks passed
@beaesguerra beaesguerra deleted the update-tertiary-button-active-state branch June 25, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants