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: anchor links to package-scoped constants and variables appear off-screen #38575

Closed
dmitshur opened this issue Apr 21, 2020 · 2 comments
Labels
FrozenDueToAge help wanted 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

@dmitshur
Copy link
Contributor

dmitshur commented Apr 21, 2020

Consider the following link to a package-scoped variable (but this applies to constants too):

https://pkg.go.dev/io#ErrShortWrite

I expect to be able to use it to see and point other people to the io.ErrShortWrite variable and its documentation. It largely works, but the ErrShortWrite variable shows up slightly off-screen, covered up by the sticky header:

image

It would be better if it weren't covered up, like so:

image

This minor problem doesn't affect godoc.org and golang.org/pkg:

image

image

/cc @julieqiu

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. pkgsite UX Issues that involve UXD/UXR input labels Apr 21, 2020
@julieqiu julieqiu removed the UX Issues that involve UXD/UXR input label Apr 22, 2020
@julieqiu julieqiu changed the title pkg.go.dev: anchor links to package-scoped constants and variables appear off-screen x/pkgsite: anchor links to package-scoped constants and variables appear off-screen Jun 15, 2020
@gopherbot gopherbot added this to the Unreleased milestone Jun 15, 2020
@julieqiu julieqiu modified the milestones: Unreleased, pkgsite/dochtml Aug 19, 2020
@dmitshur
Copy link
Contributor Author

Maybe the scroll-margin-top CSS property can be useful here. (I saw it mentioned recently here.)

@gopherbot
Copy link

Change https://golang.org/cl/283955 mentions this issue: content,internal: fix anchor target links for constants and variables

@golang golang locked and limited conversation to collaborators Jan 15, 2022
@hyangah hyangah added the pkgsite/frontend Issues related to pkgsite HTML/CSS/JavaScript and frontend development label May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted 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