-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[docs] Refactor Pickers Localization
documentation sections
#11989
Conversation
Deploy preview: https://deploy-preview-11989--material-ui-x.netlify.app/ Updated pages: |
@@ -32,11 +32,14 @@ Learn more about the _Controlled and uncontrolled_ pattern in the [React documen | |||
|
|||
{{"demo": "CustomDateFormat.js"}} | |||
|
|||
:::info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO this demo should either not exist or be inside the "Localization" section below
THis would help people understand that the custom date format is part of the the Localization in our doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially, I was leaning towards that direction, but then I thought that the various custom formats for different components (date, time, and date-time) have lots of examples. If we want to provide at least a similar amount of demos in the Custom format
section, it would be huge. 🤯
That's why I decided to keep the separate section. 🤔
WDYT?
Would moving those Customize the <x> format
sections as sub-sections of Localization
make more sense to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flaviendelangle I've moved the Customize the format
sections as subsections of Localization
.
Let me know what you think. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can be a good trade-off 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the sense that you could provide a few options to select formats and then the fields will use that. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a great suggestion, I'll explore that option. 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michelengelen I've explored that possibility but felt that the increased complexity and worse demo code readability didn't help. 🤔
If we wanted it to be useful, we'd need to have an elaborate demo with code preview. 🙈
I think that for starters this improvement should be useful enough. 🤞
@@ -32,11 +32,14 @@ Learn more about the _Controlled and uncontrolled_ pattern in the [React documen | |||
|
|||
{{"demo": "CustomDateFormat.js"}} | |||
|
|||
:::info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can be a good trade-off 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the comments already mentioned I have nothing more! Nice! 🎉
Localization
documentation sectionsLocalization
documentation sections
Resolve topics discussed in https://mui-org.slack.com/archives/C04U3R2V9UK/p1707325208275059
Localization
&Validation
section in all Picker component pagesCustomize the <x> format
sections to theCustom format
documentation sectiondefaultValue
instead ofcontrolled value
Validation
section copyright consistentLocalization
section copyright