Reduce Blankslate small size padding#7930
Conversation
🦋 Changeset detectedLatest commit: 42856c6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
|
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
….com:primer/react into copilot/update-blankslate-small-size-padding
There was a problem hiding this comment.
Pull request overview
Adjusts @primer/react’s Blankslate spacing scale so size="small" is meaningfully denser, while medium/large use a tighter default padding. This fits into the component styling system by updating the CSS module tokens and adding a regression test + changeset for the consumer-facing styling change.
Changes:
- Update
Blankslatepadding tokens:small→--base-size-16,medium/large→--base-size-24. - Add a unit test that asserts the CSS variable values for each size variant.
- Refactor Storybook Vite host allowlist configuration to use a shared constant (and add a
core.allowedHostsentry).
Show a summary per file
| File | Description |
|---|---|
| packages/styled-react/.storybook/main.ts | Extracts a shared STORYBOOK_ALLOWED_HOSTS constant and applies it to Vite server config (and adds core.allowedHosts). |
| packages/react/src/Blankslate/Blankslate.test.tsx | Adds a stylesheet-rule based test asserting --blankslate-padding values for small/medium/large. |
| packages/react/src/Blankslate/Blankslate.module.css | Updates --blankslate-padding for size variants and adds a container-query override for small. |
| packages/react/.storybook/main.ts | Same Storybook allowed-hosts refactor as styled-react Storybook config (and adds core.allowedHosts). |
| package-lock.json | Updates locked workspace/version metadata to match the current package versions. |
| .changeset/tidy-blankslate-padding.md | Adds a patch changeset for the consumer-facing Blankslate spacing adjustment. |
Copilot's findings
- Files reviewed: 5/72 changed files
- Comments generated: 3
|
Integration test results from github/github-ui PR:
VRT check ensures that when visual differences are detected, the PR cannot proceed until someone acknowledges the changes by adding the "visual difference acknowledged" label. Need help? If you believe this failure is unrelated to your changes, please reach out to the Primer team for assistance. |
Closes https://github.com/github/primer/issues/6240
Blankslate
size="small"did not meaningfully reduce padding for dense layouts. This updates size padding sosmallis visibly tighter whilemediumandlargeuse the requested default spacing.Changelog
New
Changed
small:var(--base-size-16)medium/large:var(--base-size-24)Removed
Rollout strategy
Testing & Reviewing
Review the
small,medium, andlargeBlankslate variants to confirm the updated padding scale feels balanced in compact containers.Merge checklist