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

[pickers] Remove make* HOCs #25172

Merged
merged 31 commits into from
Mar 12, 2021
Merged

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Mar 3, 2021

Internal change only. If this PR broke your code, please open an issue.

Review on a per commit basis is advised without whitespace changes.

Enables a bunch of type related simplification. I could go further but this is already hard to review.

Plan (this PR):

  1. Choose a picker type (DatePicker, TimePicker, DateTimePicker)
  2. Inline the makePickerWithState call in each variant (responsive, desktop, mobile)
  3. Repeat 1. and 2. for makeWrapperComponent

From there we can hopefully simplify interface or implementation. "Simplify" does not necessarily mean add another abstraction. If we add another abstraction it has to serve a purpose other than "DRY out the code". Hopefully drawing clearer boundaries results in a more reasonable composition which naturally allows React to optimize rendering (e.g. children memoization.

@eps1lon eps1lon added the component: pickers This is the name of the generic UI component, not the React module! label Mar 3, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented Mar 3, 2021

@material-ui/lab: parsed: +3.59% , gzip: +1.11%

Details of bundle changes

Generated by 🚫 dangerJS against 5ed613b

@eps1lon eps1lon force-pushed the chore/pickers/inline-hocs branch 3 times, most recently from 1674941 to ef3134e Compare March 3, 2021 10:56
@eps1lon eps1lon force-pushed the chore/pickers/inline-hocs branch 5 times, most recently from 357f725 to c00ce51 Compare March 7, 2021 16:25
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 8, 2021
@eps1lon eps1lon force-pushed the chore/pickers/inline-hocs branch from c00ce51 to 8e72a9b Compare March 8, 2021 12:18
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 8, 2021
@eps1lon eps1lon force-pushed the chore/pickers/inline-hocs branch 3 times, most recently from b521dde to 4b43025 Compare March 11, 2021 08:00
@eps1lon eps1lon force-pushed the chore/pickers/inline-hocs branch 3 times, most recently from 6738165 to de18e07 Compare March 11, 2021 09:03
@eps1lon eps1lon force-pushed the chore/pickers/inline-hocs branch from 316f472 to 2ba7621 Compare March 11, 2021 09:45
@eps1lon eps1lon force-pushed the chore/pickers/inline-hocs branch from 2ba7621 to dd958dd Compare March 11, 2021 09:55
For static analysis
@eps1lon eps1lon marked this pull request as ready for review March 11, 2021 10:14
@eps1lon
Copy link
Member Author

eps1lon commented Mar 12, 2021

Merging to continue work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants