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

[docs] Clarify what Controlled / Uncontrolled means #8926

Merged
merged 6 commits into from May 15, 2023

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented May 9, 2023

I'm trying to improve the understanding of this section for people doing the following feedback:

I will apply the same change on all the other pages once we'll have decided on a wording

https://deploy-preview-8926--material-ui-x.netlify.app/x/react-date-pickers/date-picker/#uncontrolled-vs-controlled-value

@flaviendelangle flaviendelangle added docs Improvements or additions to the documentation component: pickers This is the name of the generic UI component, not the React module! labels May 9, 2023
@flaviendelangle flaviendelangle self-assigned this May 9, 2023
@mui-bot
Copy link

mui-bot commented May 9, 2023

Netlify deploy preview

Netlify deploy preview: https://deploy-preview-8926--material-ui-x.netlify.app/

Updated pages

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 676.7 1,481.9 676.7 1,007.24 386.06
Sort 100k rows ms 901.6 1,384.1 1,384.1 1,154.62 199.512
Select 100k rows ms 311.7 431.7 369.6 362.62 44.44
Deselect 100k rows ms 150.9 404 175.4 230.5 97.418

Generated by 🚫 dangerJS against 882bb24

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.

Seems like it could be a nice improvement.

I think that the main question is regarding the best location to place this callout. Would it make sense putting it just below the paragraph and before the demo to increase visibility? 🤔
Screenshot 2023-05-09 at 14 19 27

docs/data/date-pickers/date-picker/date-picker.md Outdated Show resolved Hide resolved
@samuelsycamore
Copy link
Member

samuelsycamore commented May 10, 2023

What do you think about including a sentence or two summarizing the React docs here? It would be nice if the reader didn't have to leave this page to at least get a basic idea of what this means.

@flaviendelangle
Copy link
Member Author

@samuelsycamore if we make the note longer, would you put in on top or under the demo?
The longer it is, the more it's pushing the demo down if rendered on top.

@samuelsycamore
Copy link
Member

samuelsycamore commented May 10, 2023

@samuelsycamore if we make the note longer, would you put in on top or under the demo? The longer it is, the more it's pushing the demo down if rendered on top.

I think it makes sense to keep it where it is: the concept gets introduced in the main text, and then elaborated on in the callout. Feels like a natural flow. I can imagine being frustrated if I didn't know these concepts and didn't immediately see the explanation (if it was below the demo).

@flaviendelangle
Copy link
Member Author

flaviendelangle commented May 11, 2023

@samuelsycamore I added a small description
It's not a summary of the React doc per say because the React doc is more generic, it's not only introducing the concept for the value.

@samuelsycamore
Copy link
Member

That's a great description @flaviendelangle! Maybe it should even go directly in the body text rather than in a callout? Either way, we should definitely run with this text throughout the rest of the docs.

Copy link
Contributor

@richbustos richbustos left a comment

Choose a reason for hiding this comment

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

The Info Callout LGTM!

I saw that @samuelsycamore has given the sign-off but I would recommend for one more review as I am still fairly new :)

@flaviendelangle
Copy link
Member Author

I like the callout, because I still think most people know what controlled / uncontrolled mean, so putting it outside of the main flows avoids bothering them with something "useless".

@flaviendelangle flaviendelangle merged commit f117594 into mui:master May 15, 2023
17 checks passed
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! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants