scala3 icon indicating copy to clipboard operation
scala3 copied to clipboard

New docs UI - page body width is too short, especially when maximizing the window

Open smarter opened this issue 3 years ago • 1 comments

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.

smarter avatar Aug 17 '22 10:08 smarter

Yeah currently on large (well, standard 27'') screens it looks quite weird: image

It both truncates the snippets to unusable width and makes the text too jarring to read (too clustered to the left)

keynmol avatar Sep 15 '22 19:09 keynmol

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.

Dedelweiss avatar Apr 14 '23 10:04 Dedelweiss

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

Screenshot 2023-06-06 at 15 00 32

But for 2560x1225(4k):

Screenshot 2023-06-06 at 15 08 38

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:

Screenshot 2023-06-06 at 15 08 29

1922x1225:

Screenshot 2023-06-06 at 15 09 20

1470x1225 (Minimum that the max-width is active)

Screenshot 2023-06-06 at 15 13 22

Dedelweiss avatar Jun 06 '23 13:06 Dedelweiss

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.

mbovel avatar Jul 08 '24 14:07 mbovel