-
Notifications
You must be signed in to change notification settings - Fork 621
Add size
prop to ActionList.Item
#6378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: aa33939 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 |
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a size
prop to ActionList.Item
components to support different item heights, aligning with Primer View Components. The feature allows items to be rendered in either "medium" (default) or "large" sizes.
Key changes:
- Added a new
size
prop with "medium" and "large" options to ActionList.Item - Updated styling to support larger padding for the "large" size variant
- Added comprehensive testing coverage including visual regression tests
Reviewed Changes
Copilot reviewed 9 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/react/src/ActionList/shared.ts | Added size prop type definition and updated ItemContext |
packages/react/src/ActionList/Item.tsx | Implemented size prop with default value and data attribute |
packages/react/src/ActionList/ActionList.module.css | Added CSS styles for large size variant |
packages/react/src/ActionList/ActionList.stories.tsx | Added size control to Storybook playground |
packages/react/src/ActionList/ActionList.features.stories.tsx | Added LargeItem story demonstrating the feature |
packages/react/src/ActionList/ActionList.docs.json | Updated API documentation with size prop |
e2e/components/ActionList.test.ts | Added visual regression test for large items |
packages/react/src/NavList/snapshots/NavList.test.tsx.snap | Updated snapshots with new data-size attribute |
.changeset/yellow-sheep-dress.md | Added changeset for minor release |
Closes https://github.com/github/primer/issues/4587
Changelog
Aligning(ish) with PVC. We seem to offer an xlarge in Primer View Components but I don't think it's used, nor do I know a use case for it.
New
Changed
Removed
Rollout strategy
Testing & Reviewing
Merge checklist