-
Notifications
You must be signed in to change notification settings - Fork 18k
x/pkgsite: allow hiding of left menu #42487
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
Comments
It looks like there are CSS rules to automatically close the menu (rather, open the menu since mobile is default), I think this is the relevant breakpoint: https://github.com/golang/pkgsite/blob/master/content/static/css/sidenav.css#L97 My guess is that your half-screen size is probably not small enough to trigger the breakpoint. Might be worth mentioning your screen size + resolution. So far, the paths I see is that the breakpoint could be adjusted or a toggle be implemented. I'd be happy to help with this issue once a resolution has been made. |
Outer window size:
Inner window size:
I usually use chromium on my laptop with 110% and 125% zoom levels and it is very irritating to scroll code snippets.. 110% zoom level: 125% zoom level: Toggle is a great idea ! |
Thanks for the feedback! /cc @georgehu @Joanne881107 @fflewddur for UX input |
I think supporting a user option to hide the left-hand menu is a good idea. That menu is designed to support faster navigation when screen size permits, but if our heuristic isn't 100% accurate, a user-controlled fallback makes sense. One additional option to consider is whether we'd be able to detect overflow in the code blocks and automatically hide/minimize the nav menu when that happens (assuming we can also add line breaks to abnormally long lines, otherwise some packages might always have this menu hidden). |
And the right hand bar as well please, before godoc.org goes away but I'll guess I can add some browser extension to force it if it doesn't. The choice should be persistent by saving a a cookie or something. These are some differences how the two sites looks for me as a usually place my windows. In both cases the godoc.org version is much much easier to read. Even a little bit of line wrapping does a lot to make the index slower to scan. It looks like the godoc.org only has a fixed max width for it's content and pkg.go.dev also has that but the side bars are prioritized over it. Maybe it would be a good idea for the user to be able to choose that as the width threshold where the left and right hand stuff goes away? I don't know what the solution is but as it works now it's not even a remotely comfortable reading experience for me . |
We are testing out layout changes on the beta site related to this issue. Although the current set of changes do not provide an option to hide the left nav, at 1366x768 with 110% zoom the page should render in the single column layout. Take a look at https://beta.pkg.go.dev/net/http. |
Layout changes are live on pkg.go.dev. I think we can close this for now. Let's start a new issue on layout change feedback if new issues crop up. |
What is the URL of the page with the issue?
https://pkg.go.dev/net/http
What did you expect to see?
Please, allow hiding of the left menu. It is really inconvenient to read docs on half screen..
Screenshot
The text was updated successfully, but these errors were encountered: