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/website: anchor links don't seem to work properly anymore #49754

Closed
mvdan opened this issue Nov 23, 2021 · 3 comments
Closed

x/website: anchor links don't seem to work properly anymore #49754

mvdan opened this issue Nov 23, 2021 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mvdan
Copy link
Member

mvdan commented Nov 23, 2021

I think this is a regression from when golang.org was replaced by go.dev in the past week or so.

If I go to https://go.dev/ref/spec#Order_of_evaluation on either Firefox 94.0.2 or Chrome 96.0.4664.45, the anchor link doesn't seem to be working properly, as I don't see the heading I linked to unless I scroll back up.

I imagine this might be related to the banners at the top, as they are what is blocking the view.

image

Here is roughly what I expected to see:

image

cc @dmitshur

@gopherbot gopherbot added this to the Unreleased milestone Nov 23, 2021
@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 23, 2021
@dmitshur
Copy link
Contributor

dmitshur commented Nov 23, 2021

Thanks for the report. This issue is reproducible for me too.

CC @jamalc, @rsc.

@rsc
Copy link
Contributor

rsc commented Nov 24, 2021

Thanks. The problem is the floating header. It seems OK to me for now to just unfloat the header. I will send a CL for that.

@gopherbot
Copy link

Change https://golang.org/cl/366974 mentions this issue: _content/css: let the go.dev header float

@rsc rsc self-assigned this Nov 24, 2021
@rsc rsc added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Nov 24, 2021
@rsc rsc removed their assignment Jun 23, 2022
passionSeven added a commit to passionSeven/website that referenced this issue Oct 18, 2022
Otherwise anchored links end up scrolling the page so that the
thing we want to see is behind the header.
We used to have JS cleverness for this, but that broke other
parts of the page - in particular, it destroyed any HTML inside
<h2> tags and also only applied to <h2> tags - so it was
deleted in CL 362499.

Let's just be less clever and let the header scroll off the page.
That is nicer for viewing content anyway.

Fixes golang/go#49754.

Change-Id: I14aa9d8e2626d917fbace14d911891777aa6a257
Reviewed-on: https://go-review.googlesource.com/c/website/+/366974
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
@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.
Projects
None yet
Development

No branches or pull requests

4 participants