-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/pkgsite: auto-expand left sidebar #40577
Comments
I wish variables were listed as well, just like types and functions, with types' methods and functions expanded as well. There's another annoying CSS thing. Currently the navigation has I suggest it gets removed. The default behavior will be the scrollbar appearance once the content exceeds the element height (which could be set to something like I also suggest using something like simplebar or overlayScrollbars which provides a much nicer looking scrollbar (for the navigation part) without sacrificing the default scrolling behavior. |
Having the functions, types, and (possibly) variables in the sidebar expanded by default would make it easier to get a sense of the API at a glance. Still, it would be no substitute for the Index we know and love from Because the Index view contains so much high value content in a condensed form, there's often no need to drill any deeper. This is increasingly true over time as one becomes more familiar with a given API. There's a related conversation happening in issue #40612 for including an Index-like view. |
Another example where this causes problems: top-level functions that return a type declared in the package are grouped together with that type, which makes them hard to find when the index is collapsed. Let's suppose I'm looking for a function in Unfortunately, the |
This UI change is really making it hard to navigate the package docs. Package index is an entry point for many users. The index serves as a summary of what's in the package. Users often CTRL+F to search for symbols and go through the entire list to have an understanding of what package provides. Having to manually expand the list is breaking how we use the package index fundamentally. |
On the search side, perhaps the sidebar could grow a search bar to make the "F" hotkey functionality more discoverable? +1 for some kind of expand/collapse all button even with that. |
/cc @spf13 @fflewddur for product / UXR input |
There’s a lot of other feedback in this bug. May be worth splitting that out to separate issues. The original issue of not having the functions and types be expanded by default has been fixed (just not deployed). |
Change https://golang.org/cl/276234 mentions this issue: |
This issue should have been closed once the changes outlined in #40577 (comment) were deployed. Closing in favor of split-off bugs. |
What is the URL of the page with the issue?
Any package, for example, https://pkg.go.dev/net/http?tab=doc
What is your user agent?
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36
Screenshot
What did you expect to see?
This may be more of a personal preference than a bug, so feel free to close...
Before the sidebar was introduced, the first thing I usually did when reading package documentation was to click the Index. This provided a great overview of all the definitions in the package, which is helpful when I don't know the name of the definition I want.
Index has been replaced by the navigation sidebar on the left. I think this is generally a good idea: it's nice to have it visible after clicking through to a definition. However, Functions and Types are not expanded by default within the sidebar, so reading through definitions requires extra clicks on small disclosure triangles. Would it be possible to expand these by default?
What did you see instead?
Functions and Types are not expanded.
The text was updated successfully, but these errors were encountered: