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

[RFC] Drop the component prop from all Base UI components #36679

Closed
19 tasks done
mnajdova opened this issue Mar 29, 2023 · 11 comments
Closed
19 tasks done

[RFC] Drop the component prop from all Base UI components #36679

mnajdova opened this issue Mar 29, 2023 · 11 comments
Labels
breaking change package: base-ui Specific to @mui/base umbrella For grouping multiple issues to provide a holistic view
Milestone

Comments

@mnajdova
Copy link
Member

mnajdova commented Mar 29, 2023

Summary 💡

Currently, there are two different APIs for setting the root slot in Base UI (using the component prop and using the slots.root prop).

The difference between these two APIs is that the component prop makes the component polymorphic, which means that you can propagate the root component's props on the unstyled component directly, without getting typescript issues. However, this has shown to have big performance implications when doing the type checks (see some existing issues for the Material UI's components).

Progress 🚧

This is the list of components that should be changed with this proposal:

@mnajdova mnajdova added umbrella For grouping multiple issues to provide a holistic view breaking change package: base-ui Specific to @mui/base labels Mar 29, 2023
@sai6855
Copy link
Contributor

sai6855 commented Mar 29, 2023

Not sure if it's relevant to this issue - I've opened a PR while back which fixes typescript issues when using component prop in material UI components. #35924.

I'm just wondering relevance of the PR as component is being removed from Base UI package

@nicolas-ot
Copy link
Contributor

nicolas-ot commented Apr 26, 2023

I am working on the Snackbar component

PR: #37041

@nicolas-ot
Copy link
Contributor

nicolas-ot commented Apr 27, 2023

I am working on the TextareaAutosize component

edit: TextareaAutosize doesn't have slots nor component props, so I think it's irrelevant here

@nicolas-ot
Copy link
Contributor

nicolas-ot commented Apr 27, 2023

I am working on the Popper component

PR: #37060

@hbjORbj
Copy link
Member

hbjORbj commented Apr 27, 2023

thanks.. I will update the descriptions

@sai6855
Copy link
Contributor

sai6855 commented Apr 27, 2023

i'll pick up tablepagination

@hbjORbj
Copy link
Member

hbjORbj commented Apr 28, 2023

@sai6855 @nicolas-ot
Hey! Please check out this comment: #37028 (comment)

@sai6855
Copy link
Contributor

sai6855 commented Apr 28, 2023

@hbjORbj addressed in #37059, #36770. didn't addressed in remaining PR's (#37054, #37042, #36768) because they didn't have dedicated documentaion page

@hbjORbj
Copy link
Member

hbjORbj commented Apr 28, 2023

@sai6855 Reviewed them. All looks ready :)

@nicolas-ot
Copy link
Contributor

@sai6855 @nicolas-ot Hey! Please check out this comment: #37028 (comment)

updated #37060 and #37041

@hbjORbj
Copy link
Member

hbjORbj commented May 2, 2023

@nicolas-ot @sai6855 We got the job done! The changes will be included in today's release. Appreciate a lot for your amazing contributions.. :)

@mnajdova mnajdova closed this as completed May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change package: base-ui Specific to @mui/base umbrella For grouping multiple issues to provide a holistic view
Projects
Status: Recently completed
Development

No branches or pull requests

5 participants