Skip to content

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

Merged
merged 3 commits into from
Jul 29, 2025
Merged

Add size prop to ActionList.Item #6378

merged 3 commits into from
Jul 29, 2025

Conversation

langermank
Copy link
Contributor

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

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

Copy link

changeset-bot bot commented Jul 24, 2025

🦋 Changeset detected

Latest commit: aa33939

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

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

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jul 24, 2025
Copy link
Contributor

👋 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!

@github-actions github-actions bot requested a deployment to storybook-preview-6378 July 24, 2025 17:57 Abandoned
Copy link
Contributor

github-actions bot commented Jul 24, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 92.32 KB (+0.13% 🔺)
packages/react/dist/browser.umd.js 92.4 KB (+0.01% 🔺)

@langermank langermank marked this pull request as ready for review July 24, 2025 20:37
@Copilot Copilot AI review requested due to automatic review settings July 24, 2025 20:37
@langermank langermank requested review from a team as code owners July 24, 2025 20:37
@langermank langermank requested a review from mperrotti July 24, 2025 20:37
Copy link
Contributor

@Copilot Copilot AI left a 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

@langermank langermank added this pull request to the merge queue Jul 29, 2025
Merged via the queue into main with commit 3f68aa7 Jul 29, 2025
43 checks passed
@langermank langermank deleted the actionlist-size branch July 29, 2025 17:37
@primer primer bot mentioned this pull request Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants