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 plural in "Pickers" on recently introduced APIs #15297

Merged
merged 4 commits into from
Nov 6, 2024

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Nov 6, 2024

Those were introduced in the alpha or a few weeks before, so they should clearly follow the new naming strategy.

usePickersTranslations is a few months old but never documented so I migrated it as well.

Changelog

Pickers

  • The following variables were renamed to have a coherent Picker / Pickers prefix:

usePickersTranslation

- import { usePickersTranslation } from '@mui/x-date-pickers/hooks';
- import { usePickersTranslation } from '@mui/x-date-pickers';
- import { usePickersTranslation } from '@mui/x-date-pickers-pro';
+ import { usePickerTranslation } from '@mui/x-date-pickers/hooks';
+ import { usePickerTranslation } from '@mui/x-date-pickers';
+ import { usePickerTranslation } from '@mui/x-date-pickers-pro';
- const translations = usePickersTranslation();
+ const translations = usePickerTranslation();

usePickersContext

- import { usePickersContext } from '@mui/x-date-pickers/hooks';
- import { usePickersContext } from '@mui/x-date-pickers';
- import { usePickersContext } from '@mui/x-date-pickers-pro';
+ import { usePickerContext } from '@mui/x-date-pickers/hooks';
+ import { usePickerContext } from '@mui/x-date-pickers';
+ import { usePickerContext } from '@mui/x-date-pickers-pro';
- const pickersContext = usePickersContext();
+ const pickerContext = usePickerContext();

@flaviendelangle flaviendelangle marked this pull request as ready for review November 6, 2024 09:56
@flaviendelangle flaviendelangle self-assigned this Nov 6, 2024
@flaviendelangle flaviendelangle added the component: pickers This is the name of the generic UI component, not the React module! label Nov 6, 2024
@mui-bot
Copy link

mui-bot commented Nov 6, 2024

@flaviendelangle flaviendelangle changed the title [pickers] Remove plural in "Pickers" on the new contexts [pickers] Remove plural in "Pickers" on recently introduced APIs Nov 6, 2024
@flaviendelangle flaviendelangle force-pushed the picker-plural branch 4 times, most recently from 0dda943 to 68da81f Compare November 6, 2024 10:27
Copy link

github-actions bot commented Nov 6, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

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

@arthurbalduini arthurbalduini left a comment

Choose a reason for hiding this comment

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

Nice ! 🎉

Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

LGTM. 👍
Thanks for course-corrrecting the naming convention. 👍

flaviendelangle and others added 2 commits November 6, 2024 16:17
Co-authored-by: Lukas Tyla <llukas.tyla@gmail.com>
Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Co-authored-by: Lukas Tyla <llukas.tyla@gmail.com>
Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
@flaviendelangle flaviendelangle merged commit 62f3d54 into mui:master Nov 6, 2024
16 checks passed
@flaviendelangle flaviendelangle deleted the picker-plural branch November 6, 2024 16:00
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!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants