Skip to content

[system] Fix changed types between 5.14.0 and 5.14.1 #39872

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

Closed
wants to merge 1 commit into from

Conversation

gitstart
Copy link
Contributor

Description

Update the styled component typing to include component prop typing.

closes #38626


This code was written and reviewed by GitStart Community. Growing great engineers, one PR at a time.

@mui-bot
Copy link

mui-bot commented Nov 13, 2023

Netlify deploy preview

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

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 36ba47a

@gitstart gitstart changed the title MUI-38626 - [material] Typing changed between 5.14.0 and 5.14.1 and later, when overriding an overridable property using styled [system] Fix changed types between 5.14.0 and 5.14.1 Nov 13, 2023
@gitstart
Copy link
Contributor Author

@DiegoAndai this PR is ready for review

@gitstart gitstart marked this pull request as ready for review November 13, 2023 11:53
@zannager zannager added the package: system Specific to @mui/system label Nov 13, 2023
@zannager zannager requested a review from DiegoAndai November 13, 2023 14:49
@DiegoAndai
Copy link
Member

Hey @gitstart, this is the same PR as https://github.com/mui/material-ui/pull/39288/files, which was closed. We should continue the discussion in that original PR unless there's a reason not to. There's a question I made regarding the root cause of the bug.

@gitstart
Copy link
Contributor Author

Hey @gitstart, this is the same PR as https://github.com/mui/material-ui/pull/39288/files, which was closed. We should continue the discussion in that original PR unless there's a reason not to. There's a question I made regarding the root cause of the bug.

Hi @DiegoAndai, due to some internal cleanups on our end, we had to refork the repo which caused the previously pushed PRs to become permanently closed, unfortunately. However, we would be happy to continue the discussion on this PR.

@DiegoAndai
Copy link
Member

@gitstart ok, the context for the discussion is in #39288 then, and we left of in the following question from my side:

Why this change made the RootComponent become the second argument? I tested and removing & { component?: React.ElementType; } made this bug disappear. So, is the RootComponent argument supposed to be there? Or should we fix it because it shouldn't? If it is correct for RootComponent to be the third argument, we should probably update all three types on CreateMUIStyled that use forwarded props as the second argument, as that should be the third, right?

@ZeeshanTamboli
Copy link
Member

As the PR is inactive, I am closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: system Specific to @mui/system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[system] Typing changed between 5.14.0 and 5.14.1 and later, when overriding an overridable property using styled
5 participants