Conversation
🦋 Changeset detectedLatest commit: 21f2ce5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
There was a problem hiding this comment.
Pull request overview
Adds a borderRadius prop to the experimental Card component to let consumers choose between 'medium' and 'large' corner rounding (defaulting to 'large'), aligning Card styling with selectable radius tokens.
Changes:
- Introduces
borderRadius?: 'medium' | 'large'onCard, defaulting to'large', and exposes it viadata-border-radius. - Updates Card CSS to apply radius based on
data-border-radiusrather than a fixed value. - Updates Storybook playground controls and generated docs metadata to include the new prop; adds a changeset.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/Card/Card.tsx | Adds borderRadius prop with default and forwards it as data-border-radius on the root element. |
| packages/react/src/Card/Card.stories.tsx | Extends the Playground story args/controls to include borderRadius. |
| packages/react/src/Card/Card.module.css | Applies border-radius via [data-border-radius] selectors for 'medium'/'large'. |
| packages/react/src/Card/Card.docs.json | Documents the new borderRadius prop for the docs pipeline. |
| .changeset/swift-grapes-warn.md | Announces the API addition in release notes (currently marked as a patch). |
Copilot's findings
- Files reviewed: 5/5 changed files
- Comments generated: 2
| <div | ||
| ref={ref} | ||
| className={clsx(classes.Card, className)} | ||
| data-padding={padding} | ||
| data-border-radius={borderRadius} | ||
| {...rest} |
There was a problem hiding this comment.
New borderRadius behavior is not covered by unit tests. Since this component already asserts data-padding defaults/overrides in Card.test.tsx, please add similar assertions for data-border-radius (default 'large' and when borderRadius="medium").
| @@ -0,0 +1,5 @@ | |||
| --- | |||
| '@primer/react': patch | |||
There was a problem hiding this comment.
This changeset marks the release as patch, but the versioning guide indicates that adding a prop is a minor bump ("Props → A prop is added → minor"). Please update the changeset to minor (or document why this is an exception).
| '@primer/react': patch | |
| '@primer/react': minor |
|
@liuliu-dev somehow borderRadius is not loaded. Could it be that we are not loading |
|
Uh oh! @lukasoppermann, at least one image you shared is missing helpful alt text. Check #7763 (comment) to fix the following violations:
Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.
|
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/18841 |
|
@lukasoppermann good catch! I imported I asked copilot about the fallbacks:
|

Part of https://github.com/github/primer/issues/6561
Adds a
borderRadiusprop to the experimentalCardcomponent with'medium'and'large'options (defaults to'large').Changelog
New
Changed
Removed
Rollout strategy
Testing & Reviewing
Merge checklist