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] Move the demo higher in the API TOC #35202

Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Nov 19, 2022

It might solve these feedback:

Screenshot 2022-11-19 at 01 35 45

https://mui-org.slack.com/archives/C041SDSF32L/p1668804057511509

When I'm landing on the API page, I usually have to scroll to the bottom of the page to then go to the demo (it happens to me quite often). Maybe this is a better UX https://deploy-preview-35202--material-ui.netlify.app/material-ui/api/alert/. I have made sure that searching for "example" yield a result too on the page.

Close #35004

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Nov 19, 2022
@mui-bot
Copy link

mui-bot commented Nov 19, 2022

Messages
📖 Netlify deploy preview: https://deploy-preview-35202--material-ui.netlify.app/

No bundle size changes

Generated by 🚫 dangerJS against 7079722

@oliviertassinari oliviertassinari added the dx Related to developers' experience label Nov 20, 2022
Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

👍

@oliviertassinari oliviertassinari added the scope: docs-infra Specific to the docs-infra product label Nov 24, 2022
@alexfauquette
Copy link
Member

One of the ideas we had when discussing the issue was to add an explanation. Hopping it helps people who land on this page discover the structure of the docs. Especially the "Components" section.

Here is the text proposed in the issue:

This API page is a quick reference for the props and classes available to this component. To see demos and details on how to use the component in your app, visit the corresponding page in the Components section of the docs:

@oliviertassinari
Copy link
Member Author

@alexfauquette Ok, I have updated the description.

  • I have skipped "This API page is a quick reference for the props and classes available to this component." because it says the same as the description:

Screenshot 2022-11-24 at 23 09 52

  • I have shortened it to stay on one line.
  • I have replaced "details" with "example" so developers can keyword search on the page.

@samuelsycamore
Copy link
Member

Would it make more sense for this section to be a callout? It feels kind of weird to be the first section of the page, but not really a part of the page's flow. I think it should be somewhat eye-catching, since the purpose is to quickly redirect users who've landed on the wrong page.

oliviertassinari and others added 2 commits November 30, 2022 17:20
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Signed-off-by: Olivier Tassinari <olivier.tassinari@gmail.com>
@oliviertassinari
Copy link
Member Author

oliviertassinari commented Nov 30, 2022

Would it make more sense for this section to be a callout?

@samuelsycamore A callout would make the information more likely to be seen by a developer. IMHO, we don't need to go there yet. We already give it more visibility by moving it to the top and the least amount of visibility we can get away with, the better.

@oliviertassinari oliviertassinari merged commit 90d6a3b into mui:master Dec 3, 2022
@oliviertassinari oliviertassinari deleted the move-examples-at-the-top branch December 3, 2022 14:20
feliperli pushed a commit to jesrodri/material-ui that referenced this pull request Dec 6, 2022
Signed-off-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation dx Related to developers' experience scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[docs] Simplify redirection from API to components docs pages
5 participants