react icon indicating copy to clipboard operation
react copied to clipboard

refactor(Stack): write to single custom property for gap changes

Open joshblack opened this issue 1 year ago • 2 comments

Closes https://github.com/primer/react/issues/4587

Update the strategy for setting gap in Stack to use a single custom property, --stack-gap, that is written to a stack gap value (e.g. --stack-gap-normal). This is an attempt at refactoring this code so that we are writing to this value across breakpoints so that tracing down why something is happening at a breakpoint is only one jump (finding where the property is set) instead of two jumps (finding the variable for the breakpoint, finding the value that is being set for it). Curious to hear if this approach seems more clear if they are the same 👀

Changelog

New

Changed

  • Update how gap is set on Stack
  • Address gap issues on larger breakpoints

Removed

Rollout strategy

  • [x] Patch release

Testing & Reviewing

  • Verify that gap is being set correct across breakpoints, for example if none is set then it should be none across breakpoints

joshblack avatar May 13 '24 18:05 joshblack

🦋 Changeset detected

Latest commit: c902c03c45b5470e856c06868540a79142de71ac

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

This PR includes changesets to release 1 package
Name Type
@primer/react 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

changeset-bot[bot] avatar May 13 '24 18:05 changeset-bot[bot]

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 89.35 KB (0%)
packages/react/dist/browser.umd.js 89.67 KB (0%)

github-actions[bot] avatar May 13 '24 18:05 github-actions[bot]

bump @langermank when you get a sec 👀

joshblack avatar May 22 '24 15:05 joshblack