Go: x/pkgsite: make better use of horizontal space

Created on 3 Aug 2020  路  5Comments  路  Source: golang/go

With the new side navigation changes launched for documentation, we aren鈥檛 taking advantage of the amount of horizontal space we have (especially on wider viewports). This is to track investigating alternatives so that we can better use the space available.

https://stripe.com/docs/api does this rather well in my opinion.

NeedsInvestigation UX pkgsite

Most helpful comment

It would be nice if something could be done to prevent the horizontal scrollbars and truncated content, as can be seen in the first screenshot below.

The page of the first screenshot is:

The page in the first screenshot is at 100% zoom, in chromium.

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36

Despite there being tons of unused space on both sides of the page, the main content is still truncated. While I appreciate that overly wide columns of text are difficult to read, having the data truncated and needing to side-scroll -- especially multiple individual things to side-scroll -- is always worse.

screenshot-horiz-scrolling

For the sake of comparison, below is a screenshot of that content on godoc.org, on the page:

There is less information displayed vertically, but none of it is truncated:

screenshot-godoc org

All 5 comments

It would be nice if something could be done to prevent the horizontal scrollbars and truncated content, as can be seen in the first screenshot below.

The page of the first screenshot is:

The page in the first screenshot is at 100% zoom, in chromium.

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36

Despite there being tons of unused space on both sides of the page, the main content is still truncated. While I appreciate that overly wide columns of text are difficult to read, having the data truncated and needing to side-scroll -- especially multiple individual things to side-scroll -- is always worse.

screenshot-horiz-scrolling

For the sake of comparison, below is a screenshot of that content on godoc.org, on the page:

There is less information displayed vertically, but none of it is truncated:

screenshot-godoc org

Just found this, but also made a related comment at https://github.com/golang/go/issues/40612#issuecomment-670275328

Change https://golang.org/cl/248857 mentions this issue: content/static,internal: allow fluid width for documentation

In case anyone missed it, mocks for the CL above are at https://github.com/golang/go/issues/40612#issuecomment-675735671

For the sake of comparison, below is a screenshot of that content on godoc.org, on the page:

There is less information displayed vertically, but none of it is truncated:

I believe that part of the truncation going on is due to the overall increased font sizes. /grump

馃槈

I am curious how https://github.com/golang/pkgsite/commit/47151e4cbeb8af373f39c3187044361a7510b404 will affect things, though.

Was this page helpful?
0 / 5 - 0 ratings