Skip to content

Commit 2f3c172

Browse files
committed
Merge remote-tracking branch 'origin/main' into danielguillan/brand-refactor-update-subdomainnavbar
2 parents f2995a4 + e61d466 commit 2f3c172

132 files changed

Lines changed: 2928 additions & 477 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.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/brand-mcp': patch
3+
---
4+
5+
Updated `primer_brand_page_design` tool to recommend component text defaults and `primer_brand_review` to warn about unnecessary `size` props.

.changeset/conditional-button-group-children.md

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@primer/brand-mcp': patch
3+
---
4+
5+
Updated MCP gridline tools to prevent disconnected, centered border boxes:
6+
7+
- Updated `primer_brand_page_design` to prefer built-in gridline APIs and scope custom page-width frames to grouped Cards and Pillars.
8+
- Updated `primer_brand_examples` to preserve canonical Card/Pillar companion CSS and surface the focused Statistic gridline example.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react-brand': minor
3+
---
4+
5+
⚠️ `CardSkewEffect` has been removed from `@primer/react-brand`. The effect has been retired, and no replacement will be issued.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@primer/brand-mcp': minor
3+
---
4+
5+
Updated `primer_brand_setup` to create or update `AGENTS.md` beside a `package.json` that declares `@primer/react-brand`.
6+
7+
- Preserves existing instructions and appends/replaces only the Primer Brand instructions.
8+
- Requires `projectDir` when several workspace packages declare Primer Brand.
9+
- Routes future agents to the MCP tools and version-matched local documentation.

.changeset/tidy-cards-responsive.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

apps/next-docs/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# @primer/brand-docs
22

3+
## 0.73.0
4+
35
## 0.72.0
46

57
## 0.71.0

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

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import {
1515
CardVariantsProp,
1616
CardCTAVariantsProp,
1717
CardBackgroundColorsProp,
18+
CardImagePaddingProp,
19+
CardImagePositionsProp,
1820
CardLabelVariantsProp,
1921
CardIconColorsProp,
2022
CardHeadingAsProp,
@@ -161,6 +163,54 @@ Use the `Image` component to add an image to the `Card`. The `Image` component i
161163
</>
162164
```
163165

166+
### Full-bleed images
167+
168+
When an image should stretch to fill the card width, set `padding="none"` on `Card.Image` and add `hasBorder` to the `Card` for visual containment. Display full-bleed cards in a regular `Grid` with clear gaps between them rather than in a shared gridline frame. Keep the image position and aspect ratio consistent across the group.
169+
170+
```jsx live
171+
<Grid>
172+
<Grid.Column span={{xsmall: 12, large: 4}}>
173+
<Card href="https://github.com" fullWidth hasBorder ctaVariant="arrow">
174+
<Card.Heading>Build with GitHub Copilot</Card.Heading>
175+
<Card.Description>Write, review, and understand code with AI-powered assistance.</Card.Description>
176+
<Card.Image
177+
position="block-end"
178+
padding="none"
179+
src="/images/placeholder-1.png"
180+
alt="Abstract gradient illustration"
181+
aspectRatio="4:3"
182+
/>
183+
</Card>
184+
</Grid.Column>
185+
<Grid.Column span={{xsmall: 12, large: 4}}>
186+
<Card href="https://github.com" fullWidth hasBorder ctaVariant="arrow">
187+
<Card.Heading>Automate your workflow</Card.Heading>
188+
<Card.Description>Keep projects moving with tools that fit the way your team works.</Card.Description>
189+
<Card.Image
190+
position="block-end"
191+
padding="none"
192+
src="/images/placeholder-2.png"
193+
alt="Abstract gradient illustration"
194+
aspectRatio="4:3"
195+
/>
196+
</Card>
197+
</Grid.Column>
198+
<Grid.Column span={{xsmall: 12, large: 4}}>
199+
<Card href="https://github.com" fullWidth hasBorder ctaVariant="arrow">
200+
<Card.Heading>Ship secure software</Card.Heading>
201+
<Card.Description>Find and fix vulnerabilities throughout the development lifecycle.</Card.Description>
202+
<Card.Image
203+
position="block-end"
204+
padding="none"
205+
src="/images/placeholder-3.png"
206+
alt="Abstract gradient illustration"
207+
aspectRatio="4:3"
208+
/>
209+
</Card>
210+
</Grid.Column>
211+
</Grid>
212+
```
213+
164214
### Tokens
165215

166216
Use `Card.Tokens` to display more than one [Token](/components/Token).
@@ -213,6 +263,11 @@ Use `Card.Tokens` to display more than one [Token](/components/Token).
213263

214264
Forwards all the props from the [Image component](/components/Image), including `src`, `alt`, and `aspectRatio`.
215265

266+
| name | type | default | required | description |
267+
| ---------- | -------------------------- | ------------- | -------- | ----------------------------------------------------------------- |
268+
| `padding` | <CardImagePaddingProp /> | `'default'` | `false` | Controls spacing around the image within the card |
269+
| `position` | <CardImagePositionsProp /> | `block-start` | `false` | Places the image at the block-start or block-end edge of the card |
270+
216271
### Card.Icon
217272

218273
| name | type | default | required | description |

apps/next-docs/content/components/Card/react.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ export const CardCTAVariantsProp = () => <PropTableValues values={['text', 'arro
77

88
export const CardBackgroundColorsProp = () => <PropTableValues values={['default', 'subtle', 'none']} commaSeparated />
99

10+
export const CardImagePaddingProp = () => <PropTableValues values={['default', 'none']} commaSeparated />
11+
12+
export const CardImagePositionsProp = () => <PropTableValues values={['block-start', 'block-end']} commaSeparated />
13+
1014
export const CardLabelVariantsProp = () => <PropTableValues values={['token', 'accent-text']} commaSeparated />
1115

1216
export const CardTokensPositionsProp = () => <PropTableValues values={['block-start', 'block-end']} commaSeparated />
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: Minimal video player
3+
description: Use MinimalVideoPlayer for muted, looping product demonstrations with a single play and pause control
4+
keywords: ['playback', 'media', 'video', 'motion']
5+
show-tabs: false
6+
ready: true
7+
source: https://github.com/primer/brand/blob/main/packages/react/src/MinimalVideoPlayer/MinimalVideoPlayer.tsx
8+
storybook: '/brand/storybook/?path=/story/components-minimalvideoplayer--playground'
9+
thumbnail: '/images/thumbnails/minimal-video-player-thumbnail.png'
10+
thumbnail_darkMode: '/images/thumbnails/minimal-video-player-thumbnail-dark.png'
11+
---
12+
13+
```js
14+
import {MinimalVideoPlayer} from '@primer/react-brand'
15+
```
16+
17+
Use `MinimalVideoPlayer` for short, silent product demonstrations that need only a play and pause control.
18+
19+
Use [VideoPlayer](/components/VideoPlayer) when viewers need audio, captions, seeking, volume, fullscreen controls,
20+
branding, or a dedicated programmatic playback API.
21+
22+
## Examples
23+
24+
### Default
25+
26+
Pass a native video URL with `src`. The required `title` provides a concise accessible name for the video.
27+
28+
```jsx live
29+
<MinimalVideoPlayer
30+
aria-describedby="product-demo-description"
31+
poster="/images/example-poster.png"
32+
src="/example.mp4"
33+
title="Product interface demonstration"
34+
/>
35+
```
36+
37+
### Native source element
38+
39+
The component also accepts native `<source>` children.
40+
41+
```jsx live
42+
<MinimalVideoPlayer poster="/images/example-poster.png" title="Product interface demonstration">
43+
<source src="/example.mp4" type="video/mp4" />
44+
</MinimalVideoPlayer>
45+
```
46+
47+
### Disable automatic playback
48+
49+
`autoPlay` defaults to `true`, making the video eligible to play when it enters the viewport. Set it to `false` when playback should always begin with an explicit user action.
50+
51+
```jsx live
52+
<MinimalVideoPlayer
53+
autoPlay={false}
54+
poster="/images/example-poster.png"
55+
src="/example.mp4"
56+
title="Product interface demonstration"
57+
/>
58+
```
59+
60+
### Disable looping
61+
62+
Videos loop by default. Set `loop` to `false` when the demonstration should stop after one playback.
63+
64+
```jsx live
65+
<MinimalVideoPlayer
66+
loop={false}
67+
poster="/images/example-poster.png"
68+
src="/example.mp4"
69+
title="Product interface demonstration"
70+
/>
71+
```
72+
73+
### Customize control labels
74+
75+
Provide localized play and pause labels with `internalAccessibleLabels`. Keep `title` focused on naming the video rather than the control.
76+
77+
```jsx live
78+
<MinimalVideoPlayer
79+
autoPlay={false}
80+
internalAccessibleLabels={{
81+
play: 'Play product demonstration',
82+
pause: 'Pause product demonstration',
83+
}}
84+
poster="/images/example-poster.png"
85+
src="/example.mp4"
86+
title="Product interface demonstration"
87+
/>
88+
```
89+
90+
## Playback behavior
91+
92+
`MinimalVideoPlayer` is always muted, plays inline, and hides native controls. When `autoPlay` is enabled, it starts only while visible, pauses after leaving the viewport, and resumes after re-entering the viewport unless the viewer paused it manually.
93+
94+
The forwarded ref provides access to the underlying `<video>` element, but the component does not provide a higher-level programmatic playback API.
95+
96+
The component respects the viewer's reduced-motion preference. It suppresses initial automatic playback when reduced motion is requested and pauses playback if that preference becomes active. A viewer can still start the video with the visible play control.
97+
98+
## Accessibility
99+
100+
The `title` prop provides an accessible name for the video. It does not replace a text alternative for meaningful visual content.
101+
102+
For decorative motion or a demonstration that repeats information already communicated by the surrounding content, use a concise `title`. A separate description is not required because the same information is already available on the page.
103+
104+
For a meaningful silent demonstration, provide adjacent text that communicates the important actions and outcomes shown in the video. Associate that text with the video using the native `aria-describedby` attribute, as shown in the [default example](#default).
105+
106+
Use [VideoPlayer](/components/VideoPlayer) instead when the media needs audio, captions, seeking, volume, fullscreen controls, or a standalone viewing experience.
107+
108+
## Component props
109+
110+
`MinimalVideoPlayer` supports standard native `<video>` attributes except the playback attributes controlled by the component.
111+
112+
| Name | Type | Default | Required | Description |
113+
| :------------------------- | :------------------------------ | :------------------------------------------: | :------: | :--------------------------------------------------------------------- |
114+
| `autoPlay` | `boolean` | `true` | `false` | Plays automatically while visible when reduced motion is not requested |
115+
| `children` | `React.ReactNode` | | `false` | Accepts native `<source>` elements |
116+
| `internalAccessibleLabels` | `{play: string, pause: string}` | `{play: 'Play video', pause: 'Pause video'}` | `false` | Sets accessible labels for the play and pause control |
117+
| `loop` | `boolean` | `true` | `false` | Repeats the video after playback ends |
118+
| `poster` | `string` | | `false` | Sets the image shown before playback begins |
119+
| `src` | `string` | | `false` | Sets the native video source URL |
120+
| `title` | `string` | | `true` | Provides an accessible name for the video |

0 commit comments

Comments
 (0)