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] API reference layout overflow #34085

Closed
2 tasks done
c3-joshsi opened this issue Aug 26, 2022 · 5 comments · Fixed by #37405
Closed
2 tasks done

[docs] API reference layout overflow #34085

c3-joshsi opened this issue Aug 26, 2022 · 5 comments · Fixed by #37405
Assignees
Labels
docs Improvements or additions to the documentation dx Related to developers' experience priority: important This change can make a difference scope: docs-infra Specific to the docs-infra product

Comments

@c3-joshsi
Copy link

c3-joshsi commented Aug 26, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

Because of the layout/styling of pages in MUI docs, when there is overflow content, it's annoying to have to scroll to read when there is so much empty space.

Screen.Recording.2022-08-26.at.2.06.34.PM.mov

Expected behavior 🤔

I shouldn't have to scroll if the dimensions of my browser are large enough

Steps to reproduce 🕹

Steps:

  1. Go to https://mui.com/x/api/data-grid/data-grid-pro/#props (same with most other pages, cross projects).
  2. Resize window, look at Props documentation

Context 🔦

Trying to read the docs

Your environment 🌎

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Benchmarks

Screenshot 2023-01-09 at 16 18 24

@c3-joshsi c3-joshsi added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Aug 26, 2022
@siriwatknp siriwatknp added docs Improvements or additions to the documentation and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 30, 2022
@siriwatknp
Copy link
Member

@oliviertassinari Currently, the section has max-width of 105ch, should it increase for widescreen monitor?

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 31, 2022

the section has max-width of 105ch, should it increase for widescreen monitor?

@siriwatknp I think that we should be careful about the max width. As far as I know, the value of a small max width is to limits the amount of horizontal distance the eye has to travel before it has to go to the next line. The longer the distance is, the more likely our eye will land on the wrong next line. It's why the blog post area has a smaller max width than the docs, it's mostly content.

So if we increase the max width here, I think that it will improve the experience for the API tables, that are often on the API pages, but make it worse for the rest of the docs. Maybe only increasing the max-width on the API pages would make sense, but it would still be an issue for people like me that don't have an external monitor and API tables outside of the API pages. I think that the above proposal could solve this without the need to change the max width.

Previous attempts at problem: #30713 and #29062


I would propose a solution in this direction: #31745 (comment), an extract:

It would look like this:

Screenshot 2022-07-16 at 00 36 42

https://mui.com/material-ui/api/button/#props

Screenshot 2022-07-16 at 00 39 35

https://mui.com/x/api/date-pickers/calendar-picker/#props

@oliviertassinari oliviertassinari added the dx Related to developers' experience label Aug 31, 2022
@danilo-leal danilo-leal changed the title Docs Styling - Overflow content not properly handled [docs] Overflow content not properly handled Sep 6, 2022
@oliviertassinari oliviertassinari changed the title [docs] Overflow content not properly handled [docs] Improve API/Reference layout & overflow Oct 20, 2022
@oliviertassinari oliviertassinari added the scope: docs-infra Specific to the docs-infra product label Dec 3, 2022
@oliviertassinari oliviertassinari added the priority: important This change can make a difference label Dec 19, 2022
@oliviertassinari oliviertassinari changed the title [docs] Improve API/Reference layout & overflow [docs] API reference layout overflow Dec 22, 2022
@oliviertassinari
Copy link
Member

oliviertassinari commented Jan 29, 2023

There are also discussions about this problem in https://www.figma.com/file/MfirV6NOFAp2xxAZX1QU1V/Documentation?type=design&node-id=1475-18203&t=knHF31Rj2y4fLvgB-0.

@oliviertassinari
Copy link
Member

oliviertassinari commented May 23, 2023

The latest shape of the proposed solution on this:

Screenshot 2023-05-24 at 00 40 45

It would solve #36544 too.

@samuelcolburn
Copy link

Link to my feedback on this issue in a similar thread.

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 priority: important This change can make a difference scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants