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: internal folders/packages handled differently on top-level versus inside packages? #58577

Closed
thediveo opened this issue Feb 17, 2023 · 6 comments
Assignees
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite

Comments

@thediveo
Copy link

Example project where I notice this (inconsistent?) behavior: https://pkg.go.dev/github.com/thediveo/lxkns#section-directories

What is your user agent?

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36

Screenshot

image

What did you do?

Navigate to https://pkg.go.dev/github.com/thediveo/lxkns#section-directories

What did you expect to see?

The cmd directory node to contain a sub node named internal.

What did you see instead?

No such sub node named internal inside cmd, while there correctly is a top-level internal node.

@gopherbot gopherbot added this to the Unreleased milestone Feb 17, 2023
@adonovan adonovan added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 23, 2023
@findleyr
Copy link
Contributor

findleyr commented Mar 2, 2023

This appears to be only a property of the nav. The directory is there:
https://pkg.go.dev/github.com/thediveo/lxkns@v0.26.1/cmd/internal

@jamalc
Copy link

jamalc commented Mar 8, 2023

This is working as intended (CL 297109), but I agree it does seem inconsistent. Given #44356 (comment), maybe what we really want is to hide internal packages in the standard library but not third party modules.

@jamalc jamalc added NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Mar 8, 2023
@jamalc
Copy link

jamalc commented Mar 14, 2023

Any thoughts on a toggle for internal directory visibility? I've moved the top level internal directory back into regular alphabetical order in this example. I don't see a reason to treat it differently from other internal directories but someone may disagree.

Screen Recording 2023-03-14 at 1 39 00 PM

@findleyr
Copy link
Contributor

I like the toggle idea.

If I'm browsing my own code, I want to see internal. If I'm browsing other people's code, I don't want to see internal. Based on this heuristic, perhaps we should make it the default to show internal packages for cmd/pkgsite.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/476616 mentions this issue: static,internal: add toggle for internal directories on doc pages

@jamalc jamalc added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels Mar 15, 2023
@jamalc jamalc modified the milestones: Unreleased, pkgsite/later Mar 24, 2023
gopherbot pushed a commit to golang/pkgsite that referenced this issue Apr 3, 2023
Updates the directories section to display all internal directories
with toggle. Internal directories are hidden by default on pkg.go.dev
but displayed by default when pkgsite is used to display local
documentation.

For golang/go#58577.

Change-Id: Iaf9bff7829c9a5dd6f1d0d5e63975b9f066e3081
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/476616
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
@jamalc jamalc closed this as completed May 10, 2023
@thediveo
Copy link
Author

Thank you very much!

@golang golang locked and limited conversation to collaborators May 9, 2024
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
Projects
None yet
Development

No branches or pull requests

5 participants