Blankslate: shift size scale and use default button size#8034
Conversation
…um become large Co-authored-by: dylanatsmith <6905903+dylanatsmith@users.noreply.github.com>
🦋 Changeset detectedLatest commit: 6919745 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
| @@ -0,0 +1,5 @@ | |||
| --- | |||
| '@primer/react': major | |||
There was a problem hiding this comment.
I’d argue this could be a minor version but it is sort of a breaking change so 🤷♂️
|
Co-authored-by: dylanatsmith <6905903+dylanatsmith@users.noreply.github.com>
small) stylesCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rescales
Blankslatesizes so the compact styling is the default. The oldsmallstyles become the defaultmedium, the oldmediumstyles becomelarge, and the oldlargestyles are removed. The primary action button now uses the default (medium) size at every Blankslate size.Related PR
Companion change: primer/view_components#4110 — Blankslate: make compact styling the default.
Both PRs make the compact
Blankslatepresentation the default so the component stays visually consistent across our React and Rails/ViewComponents implementations. view_components has nosizeprop,BlankslateContext, orsmall/medium/largescale, so the portable part of this change there is simply promoting the compact styling to the base rules and dropping the now-redundant@containerresponsive block. They should land together to avoid the two implementations drifting apart.Changelog
New
Changed
size="medium"(default) now renders the formersmallstyling;size="large"renders the formermediumstyling.Blankslate.PrimaryActionalways renders a default-size button instead of asmallbutton on the compact size.Removed
size="small"value and the formerlargestyles.@containerresponsive block (the compact presentation it produced is now the default).BlankslateContext), which only existed to drive the conditional button size.Rollout strategy
Migration:
sizeno longer accepts"small". Consumers usingsize="small"should drop the prop (defaultmediumnow matches the old small visuals). Consumers relying on the oldmedium/largevisuals should bump up one step (medium→large); the oldlargehas no replacement.Testing & Reviewing
Default,SizeMedium, andSizeLargestories render the expected padding/typography.mediumandlarge.Merge checklist