Pillar component updates - #1345
Conversation
|
| Name | Type |
|---|---|
| @primer/react-brand | Minor |
| @primer/brand-primitives | Minor |
| @primer/brand-docs | Minor |
| @primer/brand-css | Minor |
| @primer/brand-e2e | Minor |
| @primer/brand-fonts | Minor |
| @primer/brand-config | Minor |
| @primer/brand-storybook | Minor |
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
🟢 No design token changes found |
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
There was a problem hiding this comment.
Pull request overview
Updates the Pillar component (and its downstream recipe/docs usage) to align with the “Content Pillar” refactor designs by adjusting default sizing/spacing, adding a new Storybook example, and removing the now-undesired icon color customization API.
Changes:
- Removed
Pillar.IconcolorAPI (and relatedFlexTemplateforwarding) so backgrounded Pillar icons always render green. - Updated Pillar visual styling: icon size defaults to 32, increased icon-to-heading spacing, and heading defaults to size
6. - Added a “Gridline” Storybook example and updated visual regression coverage accordingly.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/recipes/SolutionTemplates/SolutionPage/SolutionPage.tsx | Updates example usage to remove Pillar.Icon color prop. |
| packages/react/src/recipes/FlexTemplate/FlexTemplate.types.ts | Removes iconColor from pillar item type to match the removed Pillar icon color API. |
| packages/react/src/recipes/FlexTemplate/FlexSection/FlexSection.tsx | Stops forwarding iconColor into Pillar.Icon. |
| packages/react/src/recipes/FlexTemplate/examples/FlexTemplate.examples.stories.tsx | Updates recipe examples to remove iconColor usage. |
| packages/react/src/Pillar/Pillar.visual.spec.ts | Adjusts visual tests to include the new Gridline example and drop the removed icon-colors coverage. |
| packages/react/src/Pillar/Pillar.tsx | Implements Pillar icon/heading default changes and removes color prop support. |
| packages/react/src/Pillar/Pillar.module.css | Increases spacing below the icon. |
| packages/react/src/Pillar/Pillar.features.stories.tsx | Removes icon-color story content tied to the deleted API. |
| packages/react/src/Pillar/Pillar.examples.stories.tsx | Adds new “Gridline” example story. |
| apps/next-docs/content/components/Pillar/react.tsx | Removes docs helpers tied to the deleted PillarIconColors export. |
| apps/next-docs/content/components/Pillar/react.mdx | Updates documentation to remove color prop references (but still needs a couple corrections). |
| .changeset/fuzzy-pillars-smile.md | Documents the breaking API changes and visual updates for release notes. |
Copilot's findings
Comments suppressed due to low confidence (1)
packages/react/src/Pillar/Pillar.tsx:105
- In the
hasBackground={false}branch, thesizeprop is destructured but never applied to the rendered icon element/component, so consumers settingsizewill see no effect. Consider mapping named sizes to numeric (same asIcon) and passing the resolved size viacloneElement/props or applying width/height styles sosizeworks consistently regardless ofhasBackground.
function PillarIcon({icon, className, hasBackground = true, size, ...props}: PillarIconProps) {
if (!hasBackground) {
const iconWrapperProps = {
...(props as React.HTMLAttributes<HTMLSpanElement>),
className: clsx(styles.Pillar__icon, className),
- Files reviewed: 12/35 changed files
- Comments generated: 1
🟢 Unit test coverage changes foundUnit test coverage has been updated through this PR. Changes: 0 new tests, 0 removed tests, 0 improved, 1 decreased
|
🟢 Bundle size report
|
Summary
Towards https://github.com/github/brand-experience/issues/73
Additional updates to Pillar to match Content Pillar refactor designs.
🔗 Preview docs
List of notable changes:
colorprop entirely as it's no longer recommended design.What should reviewers focus on?
Steps to test:
Supporting resources (related issues, external links, etc):
Contributor checklist:
update snapshotslabel to the PR)Reviewer checklist:
Screenshots: