cue-lang / cue

The home of the CUE language! Validate and define text-based and dynamic configuration
https://cuelang.org
Apache License 2.0
4.99k stars 283 forks source link

cuelang.org: visiting an anchor/section should hide the floating header #3058

Open mvdan opened 4 months ago

mvdan commented 4 months ago

What page were you looking at?

https://cuelang.org/docs/concept/modules-packages-instances/#instances

What version of the site were you looking at?

https://github.com/cue-lang/cuelang.org/commit/47796448e1dfc31c188db061f7d785ee94df4fa8

What did you do?

Navigate to the "instances" section with the link above via a new browser tab.

What did you expect?

To be able to read the section, for example: image

What did you see instead?

Not much! image

mvdan commented 4 months ago

I realise that the header disappears and reappears as I scroll, but it should definitely default to being hidden if I navigate to any part of the page that isn't the very top.

The very same issue happens if I navigate to the page without an anchor, scroll halfway down the page (hiding the header), and refresh with Ctrl+R. The header reappears, hiding a good chunk of the visible text.

mvdan commented 4 months ago

One more thought: right now the header reappears as soon as I scroll up by a single pixel. I reckon it should take a little bit more than that, because otherwise it reappears extremely easily - for example, when I scroll down with my fingers, sometimes I'm not perfect and I scroll up by a few pixels at the start or end, due to the nature of how my fingers move. This can make the header re-appear when I don't want it to, causing a bit of frustration as it eats into my reading space.