Skip to content

Blankslate: shift size scale and use default button size#8034

Open
Copilot wants to merge 9 commits into
mainfrom
copilot/update-blankslate-styles
Open

Blankslate: shift size scale and use default button size#8034
Copilot wants to merge 9 commits into
mainfrom
copilot/update-blankslate-styles

Conversation

Copilot AI commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Rescales Blankslate sizes so the compact styling is the default. The old small styles become the default medium, the old medium styles become large, and the old large styles are removed. The primary action button now uses the default (medium) size at every Blankslate size.

Related PR

Companion change: primer/view_components#4110Blankslate: make compact styling the default.

Both PRs make the compact Blankslate presentation the default so the component stays visually consistent across our React and Rails/ViewComponents implementations. view_components has no size prop, BlankslateContext, or small/medium/large scale, so the portable part of this change there is simply promoting the compact styling to the base rules and dropping the now-redundant @container responsive block. They should land together to avoid the two implementations drifting apart.

Changelog

New

Changed

  • size="medium" (default) now renders the former small styling; size="large" renders the former medium styling.
  • Blankslate.PrimaryAction always renders a default-size button instead of a small button on the compact size.
  • Updated stories, docs metadata, Figma connect, and padding test to match the new scale.

Removed

  • size="small" value and the former large styles.
  • Redundant @container responsive block (the compact presentation it produced is now the default).
  • Now-unused Blankslate size context (BlankslateContext), which only existed to drive the conditional button size.

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

Migration: size no longer accepts "small". Consumers using size="small" should drop the prop (default medium now matches the old small visuals). Consumers relying on the old medium/large visuals should bump up one step (mediumlarge); the old large has no replacement.

Testing & Reviewing

  • Verify the Default, SizeMedium, and SizeLarge stories render the expected padding/typography.
  • Confirm primary action buttons render at the default size for both medium and large.

Merge checklist

…um become large

Co-authored-by: dylanatsmith <6905903+dylanatsmith@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ff86353

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

This PR includes changesets to release 2 packages
Name Type
@primer/react Major
@primer/mcp 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

@@ -0,0 +1,5 @@
---
'@primer/react': major

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.

I’d argue this could be a minor version but it is sort of a breaking change so 🤷‍♂️

@github-actions github-actions Bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jun 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. If this doesn't work, you can also use the original workflow here. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

To publish a canary release for integration testing, apply the Canary Release label to this PR.

Co-authored-by: dylanatsmith <6905903+dylanatsmith@users.noreply.github.com>
Copilot AI changed the title Shift Blankslate size scale: default to the compact (former small) styles Blankslate: shift size scale and use default button size Jun 23, 2026
Copilot AI requested a review from dylanatsmith June 23, 2026 14:04
@github-actions github-actions Bot temporarily deployed to storybook-preview-8034 June 23, 2026 14:05 Inactive
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Jun 23, 2026
@github-actions github-actions Bot temporarily deployed to storybook-preview-8034 June 23, 2026 19:47 Inactive
@github-actions github-actions Bot temporarily deployed to storybook-preview-8034 June 23, 2026 19:56 Inactive
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dylanatsmith dylanatsmith added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Jun 24, 2026
@github-actions github-actions Bot temporarily deployed to storybook-preview-8034 June 25, 2026 13:17 Inactive
@github-actions github-actions Bot temporarily deployed to storybook-preview-8034 June 25, 2026 16:00 Inactive
@llastflowers llastflowers removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Jun 25, 2026
@github-actions github-actions Bot temporarily deployed to storybook-preview-8034 June 25, 2026 17:23 Inactive
@llastflowers llastflowers added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Jun 25, 2026
@github-actions github-actions Bot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Jun 25, 2026
@dylanatsmith dylanatsmith marked this pull request as ready for review June 26, 2026 10:35
@dylanatsmith dylanatsmith requested a review from a team as a code owner June 26, 2026 10:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Blankslate in @primer/react to make the compact presentation the default, aligning the size scale and visuals with the companion primer/view_components implementation. It removes the old small size, shifts the remaining size styles up one step, and ensures Blankslate.PrimaryAction uses the default Button size across variants.

Changes:

  • Rescaled Blankslate size prop (medium → old small, large → old medium) and removed size="small" (plus old “large” visuals).
  • Removed now-unused BlankslateContext/provider wiring and stopped conditionally rendering a small primary action button.
  • Updated CSS, tests, Storybook stories, docs metadata, Figma connect, and added a major changeset for the breaking change.
Show a summary per file
File Description
packages/react/src/Blankslate/BlankslateContext.ts Removed the Blankslate size context now that button sizing is no longer conditional.
packages/react/src/Blankslate/Blankslate.tsx Dropped size="small" from the API and removed context usage; primary action now always uses the default Button size.
packages/react/src/Blankslate/Blankslate.module.css Shifted the size token/padding scale and removed the now-redundant container query block.
packages/react/src/Blankslate/Blankslate.test.tsx Updated padding test expectations to match the new size scale.
packages/react/src/Blankslate/Blankslate.stories.tsx Updated Storybook controls to only offer medium and large.
packages/react/src/Blankslate/Blankslate.features.stories.tsx Removed the SizeSmall story now that small is no longer supported.
packages/react/src/Blankslate/Blankslate.docs.json Updated the documented size union type to match the new API.
packages/react/src/Blankslate/Blankslate.figma.tsx Removed small from the Figma enum props mapping.
.changeset/blankslate-size-scale.md Added a major-version changeset describing the breaking size scale change.

Review details

  • Files reviewed: 9/94 changed files
  • Comments generated: 3
  • Review effort level: Low

Comment thread packages/react/src/Blankslate/Blankslate.docs.json
Comment on lines +56 to 60
it('sets reduced padding for the default medium size variant', () => {
render(<Blankslate>Test content</Blankslate>)

expect(getSizePadding('small')).toMatch(/^var\(--base-size-16/)
expect(getSizePadding('medium')).toMatch(/^var\(--base-size-16/)
})
Comment thread .changeset/blankslate-size-scale.md Outdated
Co-authored-by: dylanatsmith <6905903+dylanatsmith@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design-polish integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants