Skip to content

Add size prop to ActionList.Item - #6378

Merged
langermank merged 3 commits into
mainfrom
actionlist-size
Jul 29, 2025
Merged

Add size prop to ActionList.Item#6378
langermank merged 3 commits into
mainfrom
actionlist-size

Conversation

@langermank

Copy link
Copy Markdown
Contributor

Closeshttps://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

@changeset-bot

changeset-botBot commented Jul 24, 2025

Copy link
Copy Markdown

🦋 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
NameType
@primer/reactMinor

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-actionsgithub-actionsBot 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
@github-actions

Copy link
Copy Markdown
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-actionsBot requested a deployment to storybook-preview-6378 July 24, 2025 17:57 Abandoned
@github-actions

github-actionsBot commented Jul 24, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js92.32 KB (+0.13% 🔺)
packages/react/dist/browser.umd.js92.4 KB (+0.01% 🔺)

@github-actions
github-actionsBottemporarily deployed to storybook-preview-6378 July 24, 2025 19:50 Inactive
@langermank
langermank marked this pull request as ready for review July 24, 2025 20:37
CopilotAI review requested due to automatic review settings July 24, 2025 20:37
@langermank
langermank requested review from a team as code ownersJuly 24, 2025 20:37

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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
FileDescription
packages/react/src/ActionList/shared.tsAdded size prop type definition and updated ItemContext
packages/react/src/ActionList/Item.tsxImplemented size prop with default value and data attribute
packages/react/src/ActionList/ActionList.module.cssAdded CSS styles for large size variant
packages/react/src/ActionList/ActionList.stories.tsxAdded size control to Storybook playground
packages/react/src/ActionList/ActionList.features.stories.tsxAdded LargeItem story demonstrating the feature
packages/react/src/ActionList/ActionList.docs.jsonUpdated API documentation with size prop
e2e/components/ActionList.test.tsAdded visual regression test for large items
packages/react/src/NavList/snapshots/NavList.test.tsx.snapUpdated snapshots with new data-size attribute
.changeset/yellow-sheep-dress.mdAdded changeset for minor release

@langermank
langermank added this pull request to the merge queueJul 29, 2025
Merged via the queue into main with commit 3f68aa7Jul 29, 2025
@langermank
langermank deleted the actionlist-size branch July 29, 2025 17:37
@primerprimerBot mentioned this pull request Jul 29, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommendedThis 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.

3 participants

@langermank@francinelucca