scala3
scala3 copied to clipboard
New docs UI - page body width is too short, especially when maximizing the window
See https://github.com/lampepfl/dotty/pull/15697#issuecomment-1204987340 and https://github.com/lampepfl/dotty/pull/15697#issuecomment-1206516476 I also think that there's too much blank space in the "Attributes" section, the attribute name could be shown above its value instead of to the left to avoid that.
Yeah currently on large (well, standard 27'') screens it looks quite weird:

It both truncates the snippets to unusable width and makes the text too jarring to read (too clustered to the left)
Related to PR #17232 For the "Attributes" section, it would be a bit the same as in the mobile version, with the name of the attribute above the value? But on two columns in the Desktop version.
Hello, I see that the problem isn't closed. Is it because it's not linked to a PR or because something hasn't been fixed yet? As far as the width problem for wide screens is concerned, it seems to have been corrected in [issue 17217] (https://github.com/lampepfl/dotty/issues/17217).
For wide screen: 1922x1225
But for 2560x1225(4k):
Proposition:
So If the problem hasn't been solved because it hasn't been corrected for even larger screens.
I know that doing a fix for 4k screens would mean doing a fix for a very, very small proportion of users.
But I can propose a fix by changing the maximum width of #content > div:first-child from 720px to a percentage like 50% :
Result:
2560x1225:
1922x1225:
1470x1225 (Minimum that the max-width is active)
Note that there are also important readability and accessibility criteria to consider, such as having 9-12 words per line, which take precedence over aesthetic concerns. This is similar to the reasoning behind wide margins in LaTeX—they serve a purpose.
While there probably is room for improvement, we should be cautious when making changes to these aspects, especially since the initial design was crafted by professional graphic designers, I believe.