react icon indicating copy to clipboard operation
react copied to clipboard

Allow `Button` to break-word for extra long labels (edge cases)

Open langermank opened this issue 2 years ago • 4 comments

Closes #

Changelog

New

Changed

Removed

Rollout strategy

  • [ ] Patch release
  • [ ] Minor release
  • [ ] Major release; if selected, include a written rollout or migration plan
  • [ ] None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

  • [ ] Added/updated tests
  • [ ] Added/updated documentation
  • [ ] Added/updated previews (Storybook)
  • [ ] Changes are SSR compatible
  • [ ] Tested in Chrome
  • [ ] Tested in Firefox
  • [ ] Tested in Safari
  • [ ] Tested in Edge
  • [ ] (GitHub staff only) Integration tests pass at github/github (Learn more about how to run integration tests)

langermank avatar Dec 14 '23 22:12 langermank

⚠️ No Changeset found

Latest commit: 9fb8940fa233ebd1c94b3313c2f45a9b3d7ab4f3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Dec 14 '23 22:12 changeset-bot[bot]

size-limit report 📦

Path Size
dist/browser.esm.js 104.61 KB (+0.13% 🔺)
dist/browser.umd.js 105.25 KB (+0.14% 🔺)

github-actions[bot] avatar Dec 14 '23 22:12 github-actions[bot]

I have a path forward for preserving the top and bottom padding for buttons with wrapping lines of text.

We can set the following styles on the "buttonContent" container element:

align-self: stretch;
padding-block: calc(var(--control-{size}-paddingBlock, {fallback}) - 2px)

These styles force .buttonContent to fill the height of the button, then adds the correct amount of padding minus the top and bottom borders.

mperrotti avatar Dec 18 '23 22:12 mperrotti

Talked to Katie about my idea on Slack and got the go-ahead to push up changes.

mperrotti avatar Dec 18 '23 22:12 mperrotti

Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days.

github-actions[bot] avatar Mar 24 '24 01:03 github-actions[bot]