x/pkgsite: Wrong section expanded when clicking a collapsable header
What is the URL of the page with the issue?
Any documentation page on pkg.go.dev is susceptible. Example pages: https://pkg.go.dev/time https://pkg.go.dev/encoding/json
What is your user agent?
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0
Screenshot
What did you do?
Open page, click 'Types' or 'Functions' in the left navigation pane
What did you expect to see?
An expanded list of available Types or Functions, respectively, in the time package
What did you see instead?
An expanded list of Examples
Related Issues
- x/pkgsite: cannot see type methods in sidebar if there are examples nearby #75369
- x/pkgsite: TOC behavior regression after examples added to the top-level #76333 (closed)
- x/pkgsite: type header table of contents links to a different type #64582 (closed)
- go.dev: #links to examples don't expand that example. #38480 (closed)
- x/pkgsite: std's reflect expands with zero subpackages in the directory view #70313 (closed)
- x/pkgsite: clicking a link to an anchor for an example does not show the example #37884 (closed)
- x/pkgsite: auto-expand left sidebar #40577 (closed)
- x/pkgsite: example links do not open examples #37520 (closed)
- go.dev: make links to examples automatically unfold example #38381 (closed)
- x/pkgsite: promote examples as a top-level TOC item and populate with children #73951 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
CC @golang/pkgsite.
Thanks for the report; I see the same behavior. I suspect the fix is pretty straightforward.
I’m pretty sure this is a duplicate of https://github.com/golang/go/issues/75369.