-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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] Group picker pages #6369
Conversation
These are the results for the performance tests:
|
Why not simply "Components" for this section? This would match the pattern of the Core docs. Also, given our recent discussions about formatting component names, I would expect these to be capitalized like proper nouns: Date Picker, Date Range Picker, etc. |
Because it is only pickers (components with an input and a modal / popper). Unless we decide to put everything together but that's a lot of components. |
Oh I see, I forgot about the original context for this. What about calling the section "Components" and then adding subheaders inside to organize the different kinds of components (like in the screenshot from your comment here)? I don't think it would be too many, especially when compared to Material UI for example which has 50+ pages in the "Components" section. In general, I would prefer to try to follow the structure we're already using in the Core docs as best as we can, because I think it's safe to assume that most X users start with Core first, and so we should try to maintain continuity with regards to the overall experience to make the jump from one product to the next as smooth as possible. |
@samuelsycamore another question if we do that: how do we avoid confusion between "Components" and "Custom components" ? |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
I think the "Custom components" page should be renamed 😛 to make it more clear what's in that doc. I'm actually planning to create docs on this same info for the Core libraries, so I'll add that X page to that project. As for the main topic, I see your point about going too deep with the groupings. I think the way you have it arranged here works well. 👍 |
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 mean, users will click and know what's inside the menu, but I was wondering if "Picker components" doesn't lead to thinking that it's about the components used to build the pickers.
Another consideration: to establish a clear difference from the group of pickers that are coming soon (based on the new fields), would it make sense to rename this group and the next to something like:
=> Legacy Pickers
=> Next Pickers
=> Date and time fields
=> Custom sub-components
=> Masked Pickers
=> Pickers
=> Date and time fields
=> Custom sub-components
=> Masked Pickers
=> Rich keyboard Pickers
=> Rich keyboard Fields
=> Custom sub-components
I would avoid to use I would prefer Legacy Pickers / New Pickers, or event Legacy Pickers (v5) / New Pickers (v6) to be very explicit. Renaming "Custom components" into "Custom sub-components" is fine for me, it think it makes it clear enough. |
Right. |
I think that the first thing that developers will search for is the type of field that they need: time, date, date time, and only then they will consider the type of UX they need, standalone, keyboard only, integrated, mobile only. So, I suspect that reversing the grouping could work better. I mean, this is how we structure the URLs/names already:
|
You could go for the following ?
If so, I feel like it's a lot of folders and in the case I would indeed go with headers like @samuelsycamore proposed. |
@flaviendelangle I was wondering about something like this indeed. I like the idea of Sam using the menu item subheaders to avoid too much nesting. |
@oliviertassinari if we do that, where would you put the "Getting started" page of the field ? |
@flaviendelangle I guess we could remove what is duplicated content with the other pages, move the content for advanced use cases to a guide, and move the introduction content to an overall pickers introduction page. But I didn't/can't look close enough to judge whether this could be better. Take more this as an initial confusion of somebody (me) that isn't familiar with the evaluation of the component. I landed on https://deploy-preview-6369--material-ui-x.netlify.app/x/react-date-pickers/getting-started/ and wondered "wait, I'm looking for a date picker, no time, no ranges, where can I find this?" The docs felt a bit overwhelming. I like how https://reactdatepicker.com/ is simple, it shows the demos & code upfront rather than telling (they could tell more though, but after the demos). |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
docs/data/pages.ts
Outdated
{ pathname: '/x/react-date-pickers/validation' }, | ||
{ pathname: '/x/react-date-pickers/localization' }, | ||
{ pathname: '/x/react-date-pickers/fields', title: 'Keyboard editing' }, |
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'm wondering if those should not be on top of the components, because by priority of reading, I think it's:
- Common usage (validation, localization)
- Specific usage (Date picker special props)
- Customization (slots)
- components API
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—the current order makes a tiny bit more sense.
From DX PoV I'd firstly be looking at which component to (can I) use. And only after that consider localisation and validation. 🤔
The only section to me that sounds and looks off is the Keyboard editing
... 🙈
I think that we should either update the page title/contents a bit or use a different name.
Maybe going with Field components
would make more sense?
And, IMO, this section could use a newFeature: true
prop 🤔
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.
With the new grouping by type, I feel like we are pushing the user to first find its component page and use it as the entry-point for the rest.
I don't think you come to the doc looking for information about the Localization / Validation before first checking how to use the component you need.
On nuance, the Localization pages will contain very basic topic on how to install and use the adapters after #6625 (which is probably even more early-stage in the user needs), but the needed sections will be linked from the getting started.
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.
The only section to me that sounds and looks off is the
Keyboard editing
... see_no_evilI think that we should either update the page title/contents a bit or use a different name.
Maybe going with
Field components
would make more sense? And, IMO, this section could use anewFeature: true
prop thinking
This page contains two quite different kind of content
-
Basic topics about what fields are. This could probably be moved to the Getting Started page on a new sections explaining that we have 3 type of components: the Pickers, the Fields and the Calendar / Clock. It could also be in a Components page that would be a summary of the available components if we feel that it's to much for the Getting Started/
-
Advanced topics (the current Advanced section)? This could be moved in an Advanced folder like on the grid with a Field behaviors page. Or if we don't want to create a folder, directly at the root.
I had to put the current page somewhere but I do agree that it is not great.
I can name it Field components (as the alpha only have power users who can take the time to look what "Field" mean) and work on a better split on a follow up PR.
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.
Yes, I agree that we can simply name it Field components
for now and re-work the whole structure and content in a follow-up PR leaving this one with single responsibility. 😉
docs/data/pages.ts
Outdated
{ pathname: '/x/react-date-pickers/validation' }, | ||
{ pathname: '/x/react-date-pickers/localization' }, | ||
{ pathname: '/x/react-date-pickers/fields', title: 'Keyboard editing' }, |
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—the current order makes a tiny bit more sense.
From DX PoV I'd firstly be looking at which component to (can I) use. And only after that consider localisation and validation. 🤔
The only section to me that sounds and looks off is the Keyboard editing
... 🙈
I think that we should either update the page title/contents a bit or use a different name.
Maybe going with Field components
would make more sense?
And, IMO, this section could use a newFeature: true
prop 🤔
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.
It more clearly separates the MIT and Pro features, nice 👍
Off-topic
A few opportunities that I could notice while trying the preview link for how it feels to consume the docs:
- The static mode isn't static, it forces the focus: https://deploy-preview-6369--material-ui-x.netlify.app/x/react-date-pickers/date-picker/. It's why the scroll bar is broken on this page when loading it. This happens on 4-5 of the pages. It makes it hard to read the docs.
- We could disable the ads on some of the pages, e.g. https://deploy-preview-6369--material-ui-x.netlify.app/x/react-date-pickers/date-range-field/.
- The live edit demo https://deploy-preview-6369--material-ui-x.netlify.app/x/react-date-pickers/localization/#date-library-locale is broken.
We need to update the logic in the docs-infra of how we extract imports. This https://github.com/mui/material-ui/blob/04d2a26389c8ca299d5d5ab18da3e95a506f7332/docs/packages/markdown/extractImports.js#L1 is too simple. It should be like https://github.com/mui/material-ui/blob/04d2a26389c8ca299d5d5ab18da3e95a506f7332/docs/src/modules/sandbox/Dependencies.ts#L117.
Now, it uses the v1 of the live edit, the v2 makes the demo work when no edits are done. So, the bug will be less visible. TL:DR updating the @mui/monorepo will fix a large chunk of the issue. cc @bharatkashyap if it's a problem you would enjoy working on.
@oliviertassinari |
Part of #5565
Doc preview: https://deploy-preview-6369--material-ui-x.netlify.app/x/react-date-pickers/date-picker/
Follow up