Skip to content

Conversation

francinelucca
Copy link
Member

@francinelucca francinelucca commented Oct 13, 2025

Add forwardedAs wrapper to styled-components in ActionList subcomponets to prevent override

Changelog

New

  • Add forwardedAs wrapper to styled-components in ActionList subcomponets to prevent override

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

@Copilot Copilot AI review requested due to automatic review settings October 13, 2025 15:20
@francinelucca francinelucca requested a review from a team as a code owner October 13, 2025 15:20
Copy link

changeset-bot bot commented Oct 13, 2025

🦋 Changeset detected

Latest commit: d33bcfc

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

This PR includes changesets to release 1 package
Name Type
@primer/styled-react Patch

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

Update ActionList to use forwardedAs in its subcomponents.
@github-actions github-actions bot added the staff Author is a staff member label Oct 13, 2025
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 forwardedAs support to ActionList subcomponents by modifying their type definitions and implementation patterns. The changes enable these components to use custom HTML elements while maintaining styled-components compatibility.

Key changes:

  • Added as?: React.ElementType to type definitions for LinkItem, Group, LeadingVisual, and TrailingVisual components
  • Refactored components to use wrapper pattern that forwards the as prop as forwardedAs to styled components
  • Renamed existing styled components with Styled prefix to distinguish from new wrapper components

francinelucca and others added 5 commits October 13, 2025 11:21
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot requested a deployment to storybook-preview-6995 October 13, 2025 15:23 Abandoned
@primer-integration
Copy link

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/4464

@github-actions github-actions bot added the integration-tests: failing Changes in this PR cause breaking changes in gh/gh label Oct 13, 2025
@primer-integration
Copy link

🟢 ci completed with status success.

@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: failing Changes in this PR cause breaking changes in gh/gh labels Oct 13, 2025
@francinelucca francinelucca merged commit 2d37fab into main Oct 13, 2025
43 of 44 checks passed
@francinelucca francinelucca deleted the chore/actionlist-forward-as-fix branch October 13, 2025 17:18
@primer primer bot mentioned this pull request Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants