Skip to content
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: rember closed/open tree or make it URL-accessible #47462

Closed
klausman opened this issue Jul 29, 2021 · 5 comments
Closed

x/pkgsite: rember closed/open tree or make it URL-accessible #47462

klausman opened this issue Jul 29, 2021 · 5 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite/frontend Issues related to pkgsite HTML/CSS/JavaScript and frontend development pkgsite

Comments

@klausman
Copy link

klausman commented Jul 29, 2021

The old packages site at https://golang.org/pkg/ used to have the whole packages/subpackages tree expanded (and no way to collapse it). The new page for the same content (https://pkg.go.dev/std) defaults to the tree collapsed. While I understand the motivation for that, I am one of those (and I totally acknowledge that we may be a minority) that liked the full tree being visible by default. However, the site neither remembers the state of open/closed tree, nor does it allow me to have a bookmark that takes me to the page with the tree already in one or the other state.

On top of that, it's very easy to slightly miss the target of the small triangle to open a subtree and e.g. go to the io page instead of opening it to then go to ioutil. This is very frustrating, as once on the io page, I have to navigate back, scroll&find it again, and then carefully open the subtree, then click on ioutil. With the old page, or a pre-expanded tree, this would not happen.

I am aware of the "Expand All" functionality, but it is on the far-right side of the content container, and so inconvenient to use, especially on wide browser windows. My muscle memory anticipates the (old, open) tree on the left side of the page, so I'm always slightly disoriented when looking for the "Expand All" interaction.

@gopherbot gopherbot added this to the Unreleased milestone Jul 29, 2021
@jamalc
Copy link

jamalc commented Jul 29, 2021

This might not be exactly what you're looking for, but if you use a browser's find feature (command + f on a mac) the directories will expand. We could look into adding query param that expands the sections on page load for bookmarking as well.

@klausman
Copy link
Author

We could look into adding query param that expands the sections on page load for bookmarking as well.

That would be plenty enough for me, since I mostly care about it when first navigating to the page, and I basically never toggle the expansion off, so remembering state is not strictly necessary.

@jamalc jamalc self-assigned this Jul 29, 2021
@jamalc jamalc added the NeedsFix The path to resolution is known, but the work has not been done. label Jul 29, 2021
@jamalc jamalc modified the milestones: Unreleased, pkgsite/frontend Jul 29, 2021
@gopherbot
Copy link

Change https://golang.org/cl/341450 mentions this issue: static/{frontend,shared}: permalink to expanded directories

@jamalc
Copy link

jamalc commented Aug 11, 2021

After the next deploy (later today or tomorrow afternoon) the URL https://pkg.go.dev/std?expand-directories will render the standard library page with an open directory tree.

@klausman
Copy link
Author

After the next deploy (later today or tomorrow afternoon) the URL https://pkg.go.dev/std?expand-directories will render the standard library page with an open directory tree.

Fantastic, thank you!

@hyangah hyangah added the pkgsite/frontend Issues related to pkgsite HTML/CSS/JavaScript and frontend development label May 20, 2022
@rsc rsc unassigned jamalc Jun 23, 2022
@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite/frontend Issues related to pkgsite HTML/CSS/JavaScript and frontend development pkgsite
Projects
None yet
Development

No branches or pull requests

4 participants