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: type header table of contents links to a different type #64582

Open
prattmic opened this issue Dec 6, 2023 · 1 comment
Open

x/pkgsite: type header table of contents links to a different type #64582

prattmic opened this issue Dec 6, 2023 · 1 comment
Assignees
Labels
help wanted NeedsFix The path to resolution is known, but the work has not been done. pkgsite

Comments

@prattmic
Copy link
Member

prattmic commented Dec 6, 2023

What is the URL of the page with the issue?

https://pkg.go.dev/google.golang.org/grpc#EmptyDialOption

What is your user agent?

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36

Screenshot

Original: image

After clicking "Experimental":
image

What did you do?

Under the "EmptyDialOption" type, I clicked on the "Experimental" link, which is intended to be a table of contents for the headers within the type doc.

What did you expect to see?

I expected the page to jump to the "Experimental" header just a few lines below (shown in the "Original" screenshot above).

What did you see instead?

The page jumped to https://pkg.go.dev/google.golang.org/grpc#hdr-Experimental, which is part of "func ClientSupportedCompressors" instead of "type EmptyDialOption".

The problem seems to be that the IDs (#hdr-Experimental) aren't unique per type/function, so links go to whichever appears first on the page.

@gopherbot gopherbot added this to the Unreleased milestone Dec 6, 2023
@mauri870 mauri870 added help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Dec 6, 2023
@hyangah
Copy link
Contributor

hyangah commented Dec 7, 2023

@jba Isn't this an issue in go/doc/comment? (I see the same issue in godoc). Or does pkgsite use a custom header generation logic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsFix The path to resolution is known, but the work has not been done. pkgsite
Projects
None yet
Development

No branches or pull requests

6 participants