Skip to content

Conversation

@joshblack
Copy link
Member

@joshblack joshblack commented Nov 7, 2025

Closes https://github.com/github/primer/issues/6109

Applies the React 19 codemod for: https://react.dev/blog/2024/04/25/react-19-upgrade-guide#changes-to-the-reactelement-typescript-type

Changelog

New

Changed

Removed

Rollout strategy

  • None; if selected, include a brief description as to why

I believe this is a change that won't have a public impact and will only be an internal type change.

@changeset-bot
Copy link

changeset-bot bot commented Nov 7, 2025

⚠️ No Changeset found

Latest commit: bb1001d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Nov 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Or, apply the integration-tests: skipped manually label to skip these checks.

@joshblack joshblack added the skip changeset This change does not need a changelog label Nov 17, 2025
@joshblack joshblack marked this pull request as ready for review November 17, 2025 22:09
@joshblack joshblack requested a review from a team as a code owner November 17, 2025 22:09
Copilot finished reviewing on behalf of joshblack November 17, 2025 22:12
Copy link
Contributor

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 applies the React 19 codemod for react-element-default-any-props, which explicitly adds the <any> type parameter to all React.ReactElement type annotations throughout the codebase. This is an internal TypeScript change required for compatibility with React 19's stricter typing requirements and has no impact on runtime behavior or the public API.

  • Adds explicit <any> type parameter to all React.ReactElement and ReactElement type annotations
  • Affects type definitions in component props, function return types, and internal type utilities
  • Maintains backward compatibility while preparing for React 19

Reviewed Changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/react/src/utils/polymorphic.ts Updated ForwardRefComponent interface return type
packages/react/src/stories/deprecated/ActionList.stories.tsx Updated NextJSLikeLink return type
packages/react/src/internal/components/UnderlineTabbedInterface.tsx Updated icon prop type in UnderlineItemProps
packages/react/src/experimental/SelectPanel2/SelectPanel.tsx Updated Anchor variable type
packages/react/src/deprecated/ActionList/List.tsx Updated RenderItemFn return type
packages/react/src/UnderlineNav/types.ts Updated ResponsiveProps array element types
packages/react/src/UnderlineNav/UnderlineNavItem.tsx Updated icon prop type
packages/react/src/UnderlineNav/UnderlineNav.tsx Updated array element types for overflow calculations and helper functions
packages/react/src/TooltipV2/tests/Tooltip.test.tsx Updated ExampleWithActionMenu parameter type
packages/react/src/Textarea/Textarea.tsx Updated forwardRef return type
packages/react/src/SelectPanel/SelectPanelMessage.tsx Updated action prop type
packages/react/src/SelectPanel/SelectPanel.tsx Updated title, subtitle, notice text, message body/action, and footer prop types
packages/react/src/SelectPanel/SelectPanel.features.stories.tsx Updated story type definitions for messages and notices
packages/react/src/SegmentedControl/SegmentedControlIconButton.tsx Updated icon prop type
packages/react/src/SegmentedControl/SegmentedControlButton.tsx Updated leadingVisual and leadingIcon prop types
packages/react/src/SegmentedControl/SegmentedControl.tsx Updated getChildIcon return type
packages/react/src/SegmentedControl/SegmentedControl.figma.tsx Updated Figma icon prop type
packages/react/src/Radio/Radio.tsx Updated forwardRef return type
packages/react/src/Overlay/Overlay.tsx Updated BaseOverlay and Overlay forwardRef return types
packages/react/src/NavList/NavList.tsx Updated React.cloneElement type assertion for subNav
packages/react/src/NavList/NavList.test.tsx Updated NextJSLikeLink return type
packages/react/src/NavList/NavList.features.stories.tsx Updated NextJSLikeLink return type
packages/react/src/FilteredActionList/types.ts Updated RenderItemFn return type
packages/react/src/Details/Details.tsx Updated Root forwardRef return type
packages/react/src/Checkbox/Checkbox.tsx Updated forwardRef return type
packages/react/src/Button/types.ts Updated icon, leadingVisual, and trailingVisual prop types
packages/react/src/Button/ButtonBase.tsx Updated renderModuleVisual Visual parameter type
packages/react/src/Breadcrumbs/tests/Breadcrumbs.test.tsx Updated renderWithTheme parameter type
packages/react/src/Breadcrumbs/Breadcrumbs.tsx Updated array element types for items, visibleItems, menuItems, and helper function
packages/react/src/Autocomplete/AutocompleteMenu.tsx Updated leadingVisual and trailingVisual prop types
packages/react/src/ActionMenu/ActionMenu.tsx Updated children and ActionMenuAnchor prop types
packages/react/src/ActionMenu/ActionMenu.test.tsx Updated ExampleWithTooltipV2 parameter type
packages/react/src/ActionList/ActionListContainerContext.tsx Updated defaultTrailingVisual prop type
packages/react/src/ActionList/ActionList.examples.stories.tsx Updated NextJSLikeLink return type

@primer-integration
Copy link

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

@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: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Nov 17, 2025
@primer-integration
Copy link

🟢 ci completed with status success.

Copy link
Contributor

@llastflowers llastflowers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshblack joshblack added this pull request to the merge queue Nov 19, 2025
Merged via the queue into main with commit 21dd043 Nov 19, 2025
51 checks passed
@joshblack joshblack deleted the refactor/apply-react-element-default-any-props-codemod branch November 19, 2025 17:41
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 skip changeset This change does not need a changelog staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants