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] Use the new ownerState object on the <PickersTextField /> component #15863

Merged
merged 10 commits into from
Dec 17, 2024

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Dec 12, 2024

Part of #14475

I forgot this one 😬

@flaviendelangle flaviendelangle marked this pull request as draft December 12, 2024 11:24
@mui-bot
Copy link

mui-bot commented Dec 12, 2024

Deploy preview: https://deploy-preview-15863--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 8274dbf

@flaviendelangle flaviendelangle force-pushed the ownerState-input branch 2 times, most recently from 3618e05 to 306c64b Compare December 12, 2024 12:11
@flaviendelangle flaviendelangle self-assigned this Dec 12, 2024
@flaviendelangle flaviendelangle added the component: pickers This is the name of the generic UI component, not the React module! label Dec 12, 2024
@flaviendelangle flaviendelangle force-pushed the ownerState-input branch 4 times, most recently from 5779d6f to fa018dc Compare December 12, 2024 12:53
@flaviendelangle flaviendelangle changed the title [pickers] Use the new ownerState object on the PickersTextField component [pickers] Use the new ownerState object on the PickersTextField component Dec 12, 2024
@@ -46,7 +46,7 @@ export interface PickersArrowSwitcherOwnerState extends PickerOwnerState {
/**
* If `true`, this button should be hidden.
*/
hidden: boolean;
isButtonHidden: boolean;
Copy link
Member Author

Choose a reason for hiding this comment

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

I renamed that one to be consistent on the prefixing

@flaviendelangle flaviendelangle marked this pull request as ready for review December 13, 2024 11:03
@flaviendelangle flaviendelangle changed the title [pickers] Use the new ownerState object on the PickersTextField component [pickers] Use the new ownerState object on the <PickersTextField /> component Dec 13, 2024
@michelengelen michelengelen self-requested a review December 16, 2024 09:06
Copy link
Member

@michelengelen michelengelen left a comment

Choose a reason for hiding this comment

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

Only nits again! LGTM otherwise! 💪🏻


const round = (value: number) => Math.round(value * 1e5) / 1e5;

export const PickersInputBaseRoot = styled('div', {
name: 'MuiPickersInputBase',
slot: 'Root',
overridesResolver: (props, styles) => styles.root,
})<{ ownerState: OwnerStateType }>(({ theme }) => ({
})<{ ownerState: PickersTextFieldOwnerState }>(({ theme }) => ({
Copy link
Member

Choose a reason for hiding this comment

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

Just noticed this:
Do we intentionally use "TextField" here to show the meaning of the overall concept and "input" elsewhere to target the actual element?

Copy link
Member Author

Choose a reason for hiding this comment

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

The Text Field is the component that contains the label, the error message etc... AND the input.

It's not a nomenclature I love tbh, but I tried to stay close from the core logic here to smoothen the migration 👍

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.

Great work! 🎉
Leaving some nitpicks. 🙈

@flaviendelangle flaviendelangle merged commit 83a9239 into mui:master Dec 17, 2024
18 checks passed
@flaviendelangle flaviendelangle deleted the ownerState-input branch December 17, 2024 14:44
lauri865 pushed a commit to lauri865/mui-x that referenced this pull request Dec 19, 2024
LukasTy pushed a commit to LukasTy/mui-x that referenced this pull request Dec 19, 2024
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.

4 participants