Skip to content

Button API alignment - #2893

Merged
langermank merged 36 commits into
next-majorfrom
button-api-breaking-changes
Jun 9, 2023
Merged

Button API alignment#2893
langermank merged 36 commits into
next-majorfrom
button-api-breaking-changes

Conversation

@langermank

@langermanklangermank commented Feb 10, 2023

Copy link
Copy Markdown
Contributor

This PR includes breaking changes to bring the PRC Button up to the agreed upon API spec and match implementation with PVC.

  • Changes leadingIcon and trailingIcon to leadingVisual and trailingVisual (a pattern introduced with ActionList)
  • Removes Button.Counter as a child component, replacing it with a count prop. This change allows us to use the trailingVisual slot for counters, and also aligns better with all the other child elements within Button (visuals are props, not child components in this case.)
  • Removes the outline button variant as we wish to only support invisible buttons.

Screenshots

The only visual change is that the outline button variant has been removed.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@changeset-bot

changeset-botBot commented Feb 10, 2023

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: de3dc1c

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

This PR includes changesets to release 1 package
NameType
@primer/reactMajor

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

@langermanklangermank changed the title Button api breaking changesButton API alignmentFeb 10, 2023
@langermank
langermank marked this pull request as ready for review February 10, 2023 22:11
@langermank
langermank requested review from a team and broccolinisoupFebruary 10, 2023 22:11
@langermank

Copy link
Copy Markdown
ContributorAuthor

If someone wants to pair with me on how to add a codemod to handle all these prop changes, that would be great!

@github-actions
github-actionsBot temporarily deployed to storybook-preview-2893 February 10, 2023 22:17 Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2893 February 10, 2023 22:18 Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2893 February 10, 2023 22:22 Inactive
@langermank
langermank temporarily deployed to github-pages February 10, 2023 22:27 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2893 February 10, 2023 22:28 Inactive
@langermank
langermank temporarily deployed to github-pages February 10, 2023 23:13 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2893 February 10, 2023 23:14 Inactive
@broccolinisoup
broccolinisoup temporarily deployed to github-pages February 16, 2023 23:45 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2893 February 16, 2023 23:46 Inactive
@github-actions

github-actionsBot commented Feb 16, 2023

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
dist/browser.esm.js101.76 KB (-0.03% 🔽)
dist/browser.umd.js102.3 KB (+0.01% 🔺)

@broccolinisoup
broccolinisoup temporarily deployed to github-pages February 17, 2023 00:02 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2893 February 17, 2023 00:03 Inactive
@broccolinisoup
broccolinisoup temporarily deployed to github-pages February 17, 2023 04:02 — with GitHub Actions Inactive
@broccolinisoupbroccolinisoup added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label May 24, 2023
@joshblackjoshblack added update snapshots 🤖 Command that updates VRT snapshots on the pull request and removed update snapshots 🤖 Command that updates VRT snapshots on the pull request labels May 31, 2023
@joshblackjoshblack added update snapshots 🤖 Command that updates VRT snapshots on the pull request and removed update snapshots 🤖 Command that updates VRT snapshots on the pull request labels Jun 5, 2023
@broccolinisoup
broccolinisoup temporarily deployed to github-pages June 6, 2023 09:45 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2893 June 6, 2023 09:46 Inactive
@joshblackjoshblack added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Jun 6, 2023
@joshblack
joshblack temporarily deployed to github-pages June 6, 2023 18:36 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2893 June 6, 2023 18:36 Inactive
@joshblackjoshblack removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Jun 8, 2023
@joshblack
joshblack temporarily deployed to github-pages June 8, 2023 16:00 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2893 June 8, 2023 16:00 Inactive

@joshblackjoshblack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🥳

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

major releasebreaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@langermank@broccolinisoup@joshblack