executablebooks / sphinx-book-theme

A clean book theme for scientific explanations and documentation with Sphinx
https://sphinx-book-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
431 stars 197 forks source link

Contents list highlighting seems to be indexed incorrectly #659

Closed CalMacCQ closed 1 year ago

CalMacCQ commented 1 year ago

Hi ,

Describe the bug

context I came across what appears to be a minor issue with the contents list highlighting.

When I click on an entry in the contents list on the right hand side of the screen the incorrect entry seems to be highlighted. I'm not completely sure if this is a bug or intended behaviour.

I also noticed this in the sphinx_book_theme documentation.

expectation (see screenshot) I expect that when I click on 1.7.3 (October 2022) the page navigates to the heading 1.7.3 (October 2022) and the 1.7.3 (October 2022) entry in the contents list is highlighted on the right.

bug (see screenshot) When I click on 1.7.3 (October 2022) the page successfully navigates to the October entry but the 1.8.0 (November 2022) item is highlighted on the right.

It seems the entry above the one the user clicks on is highlighted.

Screenshot 2022-12-12 at 13 03 44

Reproduce the bug

  1. Go to sphinx book theme documentation -> https://sphinx-book-theme.readthedocs.io/en/stable/
  2. click on "getting started"
  3. On the contents list on the right click on "Customize your left sidebar"
  4. note how the page navigates to the correct heading but the above entry "Add a source repository button to your theme" is highlighted on the right.

Thanks :)

welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

ghost commented 1 year ago

Possible duplicate of #545

choldgraf commented 1 year ago

Yep - this is now fixed in upstream and will be resolved in the next release (after the pydata theme releases):