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: cannot click into directory with subdirectories #56519

Open
cherrymui opened this issue Nov 1, 2022 · 2 comments
Open

x/pkgsite: cannot click into directory with subdirectories #56519

cherrymui opened this issue Nov 1, 2022 · 2 comments

Comments

@cherrymui
Copy link
Member

What is the URL of the page with the issue?

https://pkg.go.dev/golang.org/x/benchmarks

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36

Screenshot

image

What did you do?

Clicked the "sweet" directory, trying to get to the page of that directory, https://pkg.go.dev/golang.org/x/benchmarks/sweet

What did you expect to see?

Some way to click into https://pkg.go.dev/golang.org/x/benchmarks/sweet from this page.

What did you see instead?

Expanded to show subdirectories. But there doesn't seem to have a way to click into https://pkg.go.dev/golang.org/x/benchmarks/sweet . Clicking again it collapsed the subdirectories. (Expansion is okay and probably desirable. But I hope there is also a way to click into that directory.) Sorry for the noise if there is a way that I didn't find. Thanks.

@gopherbot gopherbot added this to the Unreleased milestone Nov 1, 2022
@hyangah
Copy link
Contributor

hyangah commented Nov 10, 2022

The x/benchmark/sweet directory is not a go package or a go module root. If the directory has a .go file, the directory entry will become clickable. For example, golang.org/x/tools/blog is both expandable and clickable because it has a child directory AND it is also a valid go package.

Screen Shot 2022-11-10 at 9 19 54 AM

However, given that https://pkg.go.dev/golang.org/x/benchmarks/sweet is a valid page, I think linkify those directories unconditionally seem reasonable.

cc @golang/tools-team

@cherrymui
Copy link
Member Author

Thanks @hyangah ! Didn't know that having no go files is what caused this. Yeah, creating a link would still be helpful. Otherwise it would be harder to get into the sweet page from https://pkg.go.dev/golang.org/x/benchmarks. (I just edited the URL. Another way would be clicking into a subdirectory of sweet then go up a level, which seems a bit convoluted.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants