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] Allow nested LocalizationProvider #6011

Merged
merged 11 commits into from
Sep 9, 2022

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Sep 2, 2022

Part of #5844

This PR focuses on supporting nested LocalizationProvider so that we can add a small wrapper on all pickers component calling LocalizationProvider with props.localeText.
This will also allow users to create one top level LocalizationProvider with the adapter (or even in the theme) and create LocalizationProvider deeper in the tree if they want to adapter the adapterLocale or the localeText.

I added le localeText on DesktopDatePickers for demonstration purpose.


  • Remove LocalizationProvider['locale']

@flaviendelangle flaviendelangle self-assigned this Sep 2, 2022
@flaviendelangle flaviendelangle added the component: pickers This is the name of the generic UI component, not the React module! label Sep 2, 2022
@flaviendelangle flaviendelangle changed the title [pickers] Allow nested LocalizationProvider [pickers] Allow nested LocalizationProvider Sep 2, 2022
@mui-bot
Copy link

mui-bot commented Sep 2, 2022

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 505.5 974.9 653.3 719.36 192.316
Sort 100k rows ms 671.9 1,174.3 1,174.3 964.74 179.583
Select 100k rows ms 220.8 308.5 284.9 269.12 37.338
Deselect 100k rows ms 133.7 202.6 150.3 164.4 29.983

Generated by 🚫 dangerJS against 9afbc8d

@flaviendelangle flaviendelangle marked this pull request as ready for review September 5, 2022 11:07
Copy link
Member

@alexfauquette alexfauquette left a comment

Choose a reason for hiding this comment

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

Sounds good 👍

@flaviendelangle
Copy link
Member Author

I'm removing the localeText of DesktopDatePicker
I'll add it to all components in a follow up PR, it was just for demonstration purpose.

@flaviendelangle flaviendelangle changed the base branch from master to next September 9, 2022 09:35
@flaviendelangle flaviendelangle merged commit 7cd40ed into mui:next Sep 9, 2022
@flaviendelangle flaviendelangle deleted the locale-text-override branch September 9, 2022 09:36
oliviertassinari pushed a commit to oliviertassinari/mui-x that referenced this pull request Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change component: pickers This is the name of the generic UI component, not the React module! v6.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants