Skip to content

Commit 2f2c26f

Browse files
committed
Merge branch 'main' into danielguillan/add-minimal-video-player-component
2 parents 2c9a565 + 6288e69 commit 2f2c26f

145 files changed

Lines changed: 2180 additions & 760 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/hero-button-group.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@primer/react-brand': patch
3+
---
4+
5+
Added `Hero.ButtonGroup` for rendering `Button` and `ActionMenu` children. `Hero.ButtonGroup` is now the de facto way to display buttons in the `Hero`.
6+
7+
⚠️ `Hero.PrimaryAction` and `Hero.SecondaryAction` are now deprecated. Please migrate over to `Hero.ButtonGroup` as they will be removed in a future release.
8+
9+
Migrate using the following approach:
10+
11+
```diff
12+
-<Hero.PrimaryAction href="#">Primary action</Hero.PrimaryAction>
13+
-<Hero.SecondaryAction href="#">Secondary action</Hero.SecondaryAction>
14+
+<Hero.ButtonGroup>
15+
+ <Button as="a" href="#">
16+
+ Primary action
17+
+ </Button>
18+
+ <Button as="a" href="#">
19+
+ Secondary action
20+
+ </Button>
21+
+</Hero.ButtonGroup>
22+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@primer/react-brand': minor
3+
'@primer/brand-css': minor
4+
---
5+
6+
⚠️ Breaking change to `Hero.Image` and `Hero.Video` ⚠️
7+
8+
Previously combined `padding` and `position` semantics have been separated.
9+
10+
The `position` prop will now only control layout and positioning relative to the content. It accepts `block-end`, `inline-start`, or `inline-end`.
11+
12+
```diff
13+
-<Hero.Image position="block-end-padded" src="image.jpg" alt="" />
14+
+<Hero.Image position="block-end" padding="all" src="image.jpg" alt="" />
15+
```

.changeset/quiet-otters-dance.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@primer/react-brand': minor
3+
---
4+
5+
⚠️ Breaking change: Removed the `imageBackgroundColor` prop from `River.Visual`, `RiverBreakout.Visual`, and `RiverBreakoutTabs.Visual`.
6+
7+
The `River` `gridline` variant now applies the full-bleed visual background layout by default. Remove `imageBackgroundColor="subtle"` from `River.Visual` when using the `gridline` variant.
8+
9+
Remove `imageBackgroundColor` from `RiverBreakout.Visual` and `RiverBreakoutTabs.Visual` without replacement. Their default visual treatments are unchanged.
10+
11+
The background treatment is not applied to the default `River` variant or either `RiverBreakout` variant.
12+
13+
Updated the River `gridline` variant tablet layout with a `618px` max-width and lateral gridlines.

.changeset/river-visual-layout.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@primer/react-brand': minor
3+
'@primer/brand-css': minor
4+
'@primer/brand-primitives': minor
5+
---
6+
7+
Added opt-in `position` and `padding` controls to `River.Visual` media in the `gridline` variant.
8+
9+
🔗 Storybook examples:
10+
11+
- [Center position](https://stunning-chainsaw-j82glqz.pages.github.io/brand/storybook/?path=/story/components-river-features-gridline-variants--grid-line-visual-position-center)
12+
- [Block-end position](https://stunning-chainsaw-j82glqz.pages.github.io/brand/storybook/?path=/story/components-river-features-gridline-variants--grid-line-visual-position-block-end)
13+
- [Block-end inline-start position](https://stunning-chainsaw-j82glqz.pages.github.io/brand/storybook/?path=/story/components-river-features-gridline-variants--grid-line-visual-position-block-end-inline-start)
14+
- [Block-end inline-end position](https://stunning-chainsaw-j82glqz.pages.github.io/brand/storybook/?path=/story/components-river-features-gridline-variants--grid-line-visual-position-block-end-inline-end)
15+
- [No padding](https://stunning-chainsaw-j82glqz.pages.github.io/brand/storybook/?path=/story/components-river-features-gridline-variants--grid-line-visual-padding-none)
16+
- [Padding on all sides](https://stunning-chainsaw-j82glqz.pages.github.io/brand/storybook/?path=/story/components-river-features-gridline-variants--grid-line-visual-padding-all)

.changeset/silver-pandas-draw.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react-brand': patch
3+
---
4+
5+
Improve `RiverAccordion` gridline layout on tablet viewports and update its accordion toggle icon from chevrons to triangles.

.changeset/soft-banners-sparkle.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44

55
- Restored rounded corners to `CTABanner` while preserving square edges when grid lines are enabled.
66
- Improved `ButtonGroup` to forward custom class names alongside its default styles.
7+
- Added native `ActionMenu` child support to `ButtonGroup`, including automatic sizes and positional variants, and the `CTABanner.ButtonGroup` wrapper.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
run: npm run check
4949

5050
- name: Run unit tests
51-
run: npm run test
51+
run: npm run test --workspaces --if-present
5252

5353
- name: Run MCP server smoke tests
5454
run: npm run smoke --workspace=packages/mcp

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ npm-debug.log*
2525
yarn-debug.log*
2626
yarn-error.log*
2727
debug-storybook.log
28+
.playwright-mcp/
2829

2930
# local env files
3031
.env

apps/next-docs/content/components/ButtonGroup/react.mdx

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Button group
3-
description: Use the button group component to group related buttons together.
3+
description: Use the button group component to group related buttons and action menus together.
44
keywords: ['buttons', 'control', 'action', 'group', 'paired']
55
show-tabs: true
66
tab-label: React
@@ -12,14 +12,14 @@ storybook: '/brand/storybook/?path=/story/components-buttongroup--playground'
1212
import {ButtonGroupSizesProp, ButtonGroupAsProp} from './react'
1313

1414
```js
15-
import {ButtonGroup, Button} from '@primer/react-brand'
15+
import {ActionMenu, Button, ButtonGroup} from '@primer/react-brand'
1616
```
1717

1818
## Examples
1919

2020
### Default
2121

22-
This is the default variant for the ButtonGroup component. The first button in the group is the primary button and the second button is the secondary button.
22+
This is the default variant for the ButtonGroup component. The first item in the group uses the primary button variant and the second uses the secondary button variant.
2323

2424
```jsx live
2525
<ButtonGroup>
@@ -28,9 +28,30 @@ This is the default variant for the ButtonGroup component. The first button in t
2828
</ButtonGroup>
2929
```
3030

31+
### Action menus
32+
33+
`ButtonGroup` supports up to two `Button` or `ActionMenu` children and applies a default `variant` to each one.
34+
35+
Explicit `variant` overrides to `Button` or `ActionMenu.Button` will override the default values.
36+
37+
`buttonSize` applies to both child types. Because `ActionMenu` supports only `small` and `medium`, it remains `medium` when `buttonSize="large"`. Set `size` on `ActionMenu` to override the inherited size.
38+
39+
```jsx live
40+
<ButtonGroup>
41+
<Button>Primary action</Button>
42+
<ActionMenu>
43+
<ActionMenu.Button>More actions</ActionMenu.Button>
44+
<ActionMenu.Overlay aria-label="More actions">
45+
<ActionMenu.Item value="contact-sales">Contact sales</ActionMenu.Item>
46+
<ActionMenu.Item value="view-pricing">View pricing</ActionMenu.Item>
47+
</ActionMenu.Overlay>
48+
</ActionMenu>
49+
</ButtonGroup>
50+
```
51+
3152
### Sizes
3253

33-
The ButtonGroup component can be rendered in different sizes in `medium` and `large` sizes. The default size is `medium`.
54+
The ButtonGroup component supports `small`, `medium`, and `large` buttons. The default size is `medium`. ActionMenu children support `small` and `medium`.
3455

3556
```jsx live
3657
<ButtonGroup buttonSize="large">
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use client'
22
import {PropTableValues} from '@primer/doctocat-nextjs/components'
33

4-
export const ButtonGroupSizesProp = () => <PropTableValues values={['medium', 'large']} commaSeparated />
4+
export const ButtonGroupSizesProp = () => <PropTableValues values={['small', 'medium', 'large']} commaSeparated />
55
export const ButtonGroupAsProp = () => <PropTableValues values={['button', 'a']} commaSeparated />

0 commit comments

Comments
 (0)