[Brand Refactor] Fixes CTABanner - #1362
Conversation
🦋 Changeset detectedLatest commit: 3fac55e The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 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 |
🟢 No design token changes found |
🟢 Bundle size report
|
🟢 Unit test coverage changes foundUnit test coverage has been updated through this PR. Changes: 0 new tests, 0 removed tests, 2 improved, 0 decreased
|
🟢 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
This PR addresses QA feedback for CTABanner styling by restoring rounded corners in non-gridline variants while keeping square edges for gridline layouts, and improves ButtonGroup so consumer-provided className is preserved alongside the component’s default styling.
Changes:
- Apply a rounded-corners container style to
CTABannerwhenhasGridLinesis false, and add tests to validate rounded vs. gridline behavior across variants. - Adjust
CTABannerlarge-viewport content spacing and add minimal-variant button group padding to better match designs. - Update
ButtonGroupto mergeclassNamewith its default class and add a unit test to prevent regressions.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/CTABanner/CTABanner.tsx | Adds conditional rounded container class when grid lines are not enabled; ensures CTABanner.ButtonGroup forwards default + custom classes. |
| packages/react/src/CTABanner/CTABanner.test.tsx | Adds coverage to confirm rounded corners by default across variants and explicitly not applied when hasGridLines is true. |
| packages/react/src/CTABanner/CTABanner.module.css | Introduces CTABanner-container--rounded, adjusts large breakpoint gap behavior, and adds CTABanner-buttonGroup spacing. |
| packages/react/src/CTABanner/CTABanner.module.css.d.ts | Updates generated CSS module typings for the new class names. |
| packages/react/src/ButtonGroup/ButtonGroup.tsx | Merges consumer className with the default ButtonGroup class using clsx. |
| packages/react/src/ButtonGroup/ButtonGroup.test.tsx | Adds a test ensuring custom className is forwarded alongside the default class. |
| .changeset/soft-banners-sparkle.md | Adds a patch changeset documenting the CTABanner and ButtonGroup fixes. |
Copilot's findings
- Files reviewed: 6/52 changed files
- Comments generated: 0
rezrah
left a comment
There was a problem hiding this comment.
Looks great from code perspective. Deferring to @jesussandreas for design pass. nice work @danielguillan ✨
|
@copilot please resolve the branch conflicts |
Resolved by merging |
…github.com/primer/brand into danielguillan/brand-refactor-qa-cta-banner
|
sent you a DM but here are the notes. reviewing the cta banner, i just have 2 comments.
|
Summary
Resolves https://github.com/orgs/github/projects/23995/views/1?pane=issue&itemId=185434843
Resolves https://github.com/orgs/github/projects/23995/views/1?pane=issue&itemId=159782142
Addresses 2 different items of QA feedback from the board.
Towards https://github.com/github/brand-marketing-design/issues/2606
List of notable changes:
CTABannerwhen grid lines are not enabled.CTABanneredges when grid lines are enabled so gridline borders stay aligned.ButtonGroupso custom class names are forwarded alongside its default styles.What should reviewers focus on?
CTABannerrounded corners match the expected design in default, balanced, and minimal variants.CTABanner.ButtonGroupkeeps the expected spacing without droppingButtonGroupdefault styles.Steps to test:
CTABannerstories in the Storybook preview.WithGridLinesstory keeps square edges and aligned gridline borders.Contributor checklist:
update snapshotslabel to the PR)Reviewer checklist:
Screenshots: