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

Document and test Button component's "small" size #566

Merged
merged 12 commits into from
Apr 12, 2024

Conversation

joshfarrant
Copy link
Contributor

@joshfarrant joshfarrant commented Apr 10, 2024

Summary

Adds the new "small" Button size to docs, Storybook, and adds tests for Button size.

List of notable changes:

  • add small Button to docs
  • add small button story
  • add button size tests

What should reviewers focus on?

  • Take a look at Storybook and the docs to preview the changes.
  • Check that you're happy with the approach of the test that's been added. There aren't any other instances of it.each() in the codebase, and equally you might not think it's necessary to test all size variations.

Supporting resources (related issues, external links, etc):

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • New visual snapshots have been generated / updated for any UI changes
  • All developer debugging and non-functional logging has been removed
  • Related issues have been referenced in the PR description

Reviewer checklist:

  • Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • Check that tests prove the feature works and covers both happy and unhappy paths
  • Check that there aren't other open Pull Requests for the same update/change

Screenshots:

Please try to provide before and after screenshots or videos

Before After

image

image

Copy link

changeset-bot bot commented Apr 10, 2024

🦋 Changeset detected

Latest commit: 1ab06cf

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

This PR includes changesets to release 6 packages
Name Type
@primer/brand-primitives Patch
@primer/react-brand Patch
@primer/brand-e2e Patch
@primer/brand-fonts Patch
@primer/brand-config Patch
@primer/brand-storybook 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

Copy link
Contributor

github-actions bot commented Apr 10, 2024

🔍 Design token changes found

View CSS variable changes
- --brand-control-small-paddingBlock: var(--base-size-12);
+ --brand-control-small-paddingBlock: var(--base-size-8);

Copy link
Contributor

github-actions bot commented Apr 10, 2024

🟢 No visual differences found

Our visual comparison tests did not find any differences in the UI.

@joshfarrant joshfarrant marked this pull request as ready for review April 10, 2024 13:56
@joshfarrant joshfarrant requested a review from rezrah April 10, 2024 14:03
@rezrah
Copy link
Collaborator

rezrah commented Apr 10, 2024

👋 @joshfarrant thanks for opening this PR. Just FYI that you can update your visual snapshots locally through Docker, or directly from the PR by adding the 'update snapshots' label. Latter will commit the updated snapshots to your branch.

This reverts commit b643b34.
@joshfarrant joshfarrant changed the title Joshfarrant/small button Document and test Button component's "small" size Apr 10, 2024
@rezrah
Copy link
Collaborator

rezrah commented Apr 11, 2024

Code changes LGTM 👍, nice one @joshfarrant 🙌

@auareyou would you mind giving this a quick design review / sign-off also please 🙏

@rezrah rezrah requested a review from auareyou April 11, 2024 08:20
Copy link
Contributor

@auareyou auareyou left a comment

Choose a reason for hiding this comment

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

LGTM!

@joshfarrant
Copy link
Contributor Author

@rezrah Added a new changeset, lmk if you have any suggestions 👍

@joshfarrant joshfarrant merged commit eaeb50e into main Apr 12, 2024
17 checks passed
@joshfarrant joshfarrant deleted the joshfarrant/small-button branch April 12, 2024 10:10
@primer-css primer-css mentioned this pull request Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants