Hero batch updates: Add ActionMenu to Hero and ButtonGroup changes, full-bleed media and more - #1413
Conversation
🦋 Changeset detectedLatest commit: 9e9d80e 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 |
🔍 Design token changes foundView CSS variable changes+ --brand-River-variant-gridline-visual-padding: var(--base-size-32);+ --brand-River-variant-gridline-visual-padding: var(--base-size-64); |
🟢 Bundle size report
|
🟢 Unit test coverage changes foundUnit test coverage has been updated through this PR. Changes: 0 new tests, 0 removed tests, 3 improved, 1 decreased
|
There was a problem hiding this comment.
Pull request overview
Adds first-class ActionMenu support to action slots by teaching ButtonGroup to accept ActionMenu children, and introducing Hero.ButtonGroup as the new recommended way to render Hero actions (deprecating Hero.PrimaryAction / Hero.SecondaryAction). This aligns Hero/CTABanner action composition with the same underlying grouping behavior and updates stories/docs/tests accordingly.
Changes:
- Extend
ButtonGroupto acceptActionMenuchildren and apply positional variants automatically. - Add
Hero.ButtonGroupwrapper and deprecate legacy Hero action subcomponents. - Update Storybook stories, docs (next-docs), and visual/unit tests to cover the new API and refreshed Hero+Cards example.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/ButtonGroup/ButtonGroup.tsx | Accept ActionMenu children and apply default variants. |
| packages/react/src/ButtonGroup/ButtonGroup.test.tsx | Add unit coverage for ActionMenu children and variant overrides. |
| packages/react/src/ButtonGroup/ButtonGroup.stories.tsx | Add Storybook examples for ActionMenu + overrides. |
| packages/react/src/ButtonGroup/ButtonGroup.visual.spec.ts | Add visual coverage for ActionMenu and overrides. |
| packages/react/src/Hero/Hero.tsx | Add Hero.ButtonGroup slot + deprecate legacy actions. |
| packages/react/src/Hero/sub-components/HeroButtonGroup.tsx | New wrapper component around ButtonGroup for Hero actions. |
| packages/react/src/Hero/sub-components/index.ts | Export HeroButtonGroup subcomponent. |
| packages/react/src/Hero/Hero.module.css | Adjust Hero actions flex behavior for mixed children. |
| packages/react/src/Hero/Hero.test.tsx | Add unit coverage for Hero.ButtonGroup with ActionMenu. |
| packages/react/src/Hero/Hero.visual.spec.ts | Update/add visual stories for legacy actions + ActionMenu. |
| packages/react/src/Hero/Hero.stories.tsx | Migrate default story to Hero.ButtonGroup. |
| packages/react/src/Hero/Hero.features.stories.tsx | Migrate feature stories; add ActionMenu example. |
| packages/react/src/Hero/Hero.gridline.stories.tsx | Migrate gridline stories to Hero.ButtonGroup. |
| packages/react/src/Hero/Hero.images-videos.stories.tsx | Migrate image/video stories to Hero.ButtonGroup. |
| packages/react/src/Hero/Hero.examples.stories.tsx | Update examples; refresh Hero+Cards fixture and add tokens. |
| packages/react/src/Hero/Hero.stories.module.css | Remove Hero+Cards story-only CSS variables. |
| packages/react/src/Hero/Hero.stories.module.css.d.ts | Remove generated typing for removed class. |
| packages/react/src/Hero/Hero.figma.tsx | Update Figma-connected code generation to new actions API. |
| packages/react/src/CTABanner/CTABanner.features.stories.tsx | Add CTABanner story demonstrating ActionMenu in ButtonGroup. |
| packages/react/src/CTABanner/CTABanner.visual.spec.ts | Add visual coverage for CTABanner + ActionMenu story. |
| packages/react/src/ActionMenu/ActionMenu.tsx | Replace barrel import with direct imports (Button/Text/ThemeProvider). |
| packages/mcp/src/test-utils/catalog.ts | Update catalog snippets/subcomponents list for Hero.ButtonGroup. |
| apps/next-docs/content/getting-started/index.mdx | Update getting started snippet to Hero.ButtonGroup + Button. |
| apps/next-docs/content/components/Hero/react.mdx | Document Hero.ButtonGroup, ActionMenu usage, and deprecations. |
| apps/next-docs/content/components/ButtonGroup/react.mdx | Document ActionMenu support in ButtonGroup. |
| .changeset/soft-banners-sparkle.md | Note ButtonGroup ActionMenu support in release notes. |
| .changeset/hero-button-group.md | Add changeset for Hero.ButtonGroup + deprecation guidance. |
Review details
- Files reviewed: 26/33 changed files
- Comments generated: 2
- Review effort level: Low
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
…/brand into rezrah/add-native-actionmenu-hero
Summary
Resolves #1390
Resolves #1396
Resolves #1422
Adds support for
ActionMenuinButtonGroup, which subsequently allows the former to be used in bothHeroandCTABanner.This is deprecation moment for
Hero.PrimaryActionandHero.SecondaryAction.I also fixed an outdated Hero+Card combination while modifying Hero stories.
Update: Also added "full bleed" (no padding) option to hero media and river.⚠️ This is a breaking change ⚠️
List of notable changes:
Steps to test:
Supporting resources (related issues, external links, etc):
Contributor checklist:
update snapshotslabel to the PR)Reviewer checklist:
Screenshots: