Skip to content
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

Bump @types/react to v18.3.6 #43555

Merged
merged 7 commits into from
Oct 2, 2024
Merged

Bump @types/react to v18.3.6 #43555

merged 7 commits into from
Oct 2, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 1, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@types/react (source) ^18.3.4 -> ^18.3.6 age adoption passing confidence
@types/react (source) 18.3.4 -> 18.3.6 age adoption passing confidence

Configuration

📅 Schedule: Branch creation - "on sunday before 6:00am" in timezone UTC, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Update of dependencies label Sep 1, 2024
@mui-bot
Copy link

mui-bot commented Sep 1, 2024

Netlify deploy preview

https://deploy-preview-43555--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 97bacdd

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Sep 2, 2024
@renovate renovate bot force-pushed the renovate/react-18.x branch from 8517da2 to 546dddb Compare September 2, 2024 13:20
@github-actions github-actions bot added PR: out-of-date The pull request has merge conflicts and can't be merged and removed PR: out-of-date The pull request has merge conflicts and can't be merged labels Sep 2, 2024
@renovate renovate bot force-pushed the renovate/react-18.x branch from 546dddb to 608c175 Compare September 2, 2024 15:06
@github-actions github-actions bot added PR: out-of-date The pull request has merge conflicts and can't be merged and removed PR: out-of-date The pull request has merge conflicts and can't be merged labels Sep 2, 2024
@renovate renovate bot force-pushed the renovate/react-18.x branch from 608c175 to 8066cce Compare September 2, 2024 17:20
@github-actions github-actions bot added PR: out-of-date The pull request has merge conflicts and can't be merged and removed PR: out-of-date The pull request has merge conflicts and can't be merged labels Sep 2, 2024
@renovate renovate bot force-pushed the renovate/react-18.x branch from 8066cce to 10df2ad Compare September 3, 2024 05:28
@github-actions github-actions bot added PR: out-of-date The pull request has merge conflicts and can't be merged and removed PR: out-of-date The pull request has merge conflicts and can't be merged labels Sep 3, 2024
@renovate renovate bot force-pushed the renovate/react-18.x branch from 10df2ad to a36fbf4 Compare September 3, 2024 13:00
@github-actions github-actions bot added PR: out-of-date The pull request has merge conflicts and can't be merged and removed PR: out-of-date The pull request has merge conflicts and can't be merged labels Sep 3, 2024
@renovate renovate bot force-pushed the renovate/react-18.x branch from a36fbf4 to 6fdf08c Compare September 3, 2024 15:13
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Sep 3, 2024
@DiegoAndai DiegoAndai self-assigned this Sep 3, 2024
@DiegoAndai
Copy link
Member

@michaldudak this @types/react version breaks how we handled polymorphic components in @mui/base (see DefinitelyTyped/DefinitelyTyped#70361). We could freeze the @mui/base version of @types/react, but we need to solve BasePopper.tsx, which was copied to @mui/material to remove the @mui/base dependency. For example, this removes the error:

-const PopperTooltip = React.forwardRef(function PopperTooltip<
+const PopperTooltip = React.forwardRef<HTMLDivElement, PopperTooltipProps>(function PopperTooltip<
   RootComponentType extends React.ElementType,
 >(props: PopperTooltipProps<RootComponentType>, forwardedRef: React.ForwardedRef<HTMLDivElement>) {

(source)

But it seems to me like this breaks the polymorphic usage of the RootComponentType generic. I'm not that familiar with the PolymorphicProps type so I'm not sure.

Is this the correct fix?

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Sep 5, 2024
@renovate renovate bot force-pushed the renovate/react-18.x branch from 6fdf08c to 47a4898 Compare September 5, 2024 10:24
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Sep 5, 2024
@DiegoAndai DiegoAndai added the on hold There is a blocker, we need to wait label Sep 5, 2024
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Sep 6, 2024
@renovate renovate bot force-pushed the renovate/react-18.x branch from 47a4898 to d3c9745 Compare September 6, 2024 07:13
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Sep 6, 2024
@michaldudak
Copy link
Member

Since we're casting the result of forwardRef to PolymorphicComponent<PopperTypeMap>, the change you're proposing should be safe and not noticeable for external users.

@Janpot
Copy link
Member

Janpot commented Sep 17, 2024

@DiegoAndai This seems to be the naive solution. Wouldn't that work?

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Sep 18, 2024
@github-actions github-actions bot added PR: out-of-date The pull request has merge conflicts and can't be merged and removed PR: out-of-date The pull request has merge conflicts and can't be merged labels Sep 26, 2024
@DiegoAndai
Copy link
Member

Thanks @Janpot! looks good to me.

Does this mean we can revert my commit? a5548f5

@Janpot
Copy link
Member

Janpot commented Oct 1, 2024

Does this mean we can revert my commit?

I believe so, we can solve it the same way by making the ref optional.

@DiegoAndai
Copy link
Member

I believe so, we can solve it the same way by making the ref optional.

Thanks! I'll do it and update the PR

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 2, 2024
@aarongarciah
Copy link
Member

aarongarciah commented Oct 2, 2024

@DiegoAndai I just rebased on top of master and removed your commit. I need this PR to fix some stuff #43964 (comment) I'll try to apply the necessary changes. Let's see if we can land this PR today.

@DiegoAndai
Copy link
Member

DiegoAndai commented Oct 2, 2024

@aarongarciah @Janpot I had to bring back my fix (this one): dd9c8fe and bb9f21b

Seems to me that this particular problem can't be fixed with the approach in #43792, but instead is caused by something not working with forward ref inference and our polymorphic types after DefinitelyTyped/DefinitelyTyped#70361. Please correct me if I'm wrong.

Because this issue is mainly inside mui-base, which is stale, and one material component that should be eventually removed, plus the components being casted anyways, I would merge this one to unblock the release.

@aarongarciah
Copy link
Member

aarongarciah commented Oct 2, 2024

@DiegoAndai it's fine for me. I see we need to bring the changes in the docs Next.js config file because after pnpm dedupe, next points to the newest 14.x.x version (see error https://app.netlify.com/sites/material-ui/deploys/66fd4632cd5fe8000889b866#L295)

@aarongarciah aarongarciah requested a review from Janpot October 2, 2024 13:43
@aarongarciah aarongarciah removed the on hold There is a blocker, we need to wait label Oct 2, 2024
@aarongarciah aarongarciah self-requested a review October 2, 2024 13:52
Copy link
Member

@Janpot Janpot left a comment

Choose a reason for hiding this comment

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

Seems to me that this particular problem can't be fixed with the approach in #43792, but instead is caused by something not working with forward ref inference and our polymorphic types after DefinitelyTyped/DefinitelyTyped#70361. Please correct me if I'm wrong.

Ok, I think I see what's happening, forwardRef infers PopperTooltipProps<React.ElementType> as props which includes the <details> element, which has a open property that can be undefined. The solution should be fine.

@aarongarciah aarongarciah merged commit c77bd84 into master Oct 2, 2024
23 checks passed
@aarongarciah aarongarciah deleted the renovate/react-18.x branch October 2, 2024 14:22
@DiegoAndai DiegoAndai added the React 19 support PRs required to support React 19 label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Update of dependencies React 19 support PRs required to support React 19
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants