Skip to content

Button bug fixes and visual updates - #2374

Closed
langermank wants to merge 18 commits into
mainfrom
button-block-alignment
Closed

Button bug fixes and visual updates#2374
langermank wants to merge 18 commits into
mainfrom
button-block-alignment

Conversation

@langermank

@langermanklangermank commented Sep 26, 2022

Copy link
Copy Markdown
Contributor

Note: These are breaking changes and should be considered for the next major release

Improvements

  • Add a block prop for full width
  • Add alignContent prop to align content to center or start
  • Use control sizing CSS variables
  • Use height over padding for more control over sizing
  • Refactor Button.Counter to better align with the other visual props
  • Rename visual props to better align with other Primer components

Visual updates

Addresses a few things missing from this discussion: https://github.com/github/primer/discussions/1016

  • Deprecate outline variant
  • Slightly more condensed padding
  • Improved invisible hover states (will update these colors when new functional colors are addressed)

Closes:

Screenshots

Please refer to the comprehensive Storybook stories- this is just a small sample of some of the changes

beforeafterdescription
imageimagetrailing action slot alignment
imageimagedefault padding, font-weight
imageimagelarge height
icon was blueimageinvisible svg color
imageimagetrailing action locks right in full width

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 Sep 26, 2022

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 79f8967

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

@github-actions

github-actionsBot commented Sep 26, 2022

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
dist/browser.esm.js79.23 KB (+0.36% 🔺)
dist/browser.umd.js79.88 KB (+0.38% 🔺)

@langermank
langermank temporarily deployed to github-pages September 26, 2022 21:00 Inactive
@langermank
langermank temporarily deployed to github-pages September 29, 2022 01:51 Inactive
@langermanklangermank changed the title [WIP] Button block alignmentButton bug fixes and visual updatesOct 7, 2022
@langermanklangermank added the major release breaking changes label Oct 7, 2022
@langermank
langermank marked this pull request as ready for review October 7, 2022 03:22
@langermank
langermank requested review from a team and siddharthkpOctober 7, 2022 03:22
Comment threadsrc/Button/ButtonFeatures.stories.tsx
Comment threadsrc/Button/IconButton.stories.tsx Outdated
Comment threadsrc/Button/Button.stories.tsx Outdated
Comment threadsrc/Button/ButtonBase.tsx Outdated
Comment threadsrc/Button/IconButton.tsx Outdated
Comment threadsrc/__tests__/Button.test.tsx Outdated
Comment threadsrc/Button/types.ts
Comment threadsrc/Button/types.ts
* The trailing icon comes after button content
*/
trailingIcon?: React.FunctionComponent<React.PropsWithChildren<IconProps>>
trailingVisual?: React.FunctionComponent<React.PropsWithChildren<IconProps>>

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.

Same question - should we add a unit test for it?

@langermank
langermank temporarily deployed to github-pages December 5, 2022 20:06 Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2374 December 5, 2022 20:06 Inactive
@langermank
langermank temporarily deployed to github-pages December 5, 2022 20:27 Inactive
@github-actions
github-actionsBottemporarily deployed to storybook-preview-2374 December 5, 2022 20:28 Inactive
@langermanklangermank mentioned this pull request Dec 5, 2022
6 tasks
@langermank

Copy link
Copy Markdown
ContributorAuthor

Closing in favor of #2714

@joshblack
joshblack deleted the button-block-alignment branch January 19, 2023 16:50
@langermanklangermank mentioned this pull request Jan 30, 2023
6 tasks
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@rezrah