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

[Doc] The nav bar on the right side is not activated correctly when I clicked it #33318

Closed
rkooo567 opened this issue Mar 15, 2023 · 6 comments
Closed
Assignees
Labels
docs An issue or change related to documentation P1 Issue that should be fixed within a few weeks

Comments

@rkooo567
Copy link
Contributor

Description

Screen Shot 2023-03-14 at 5 35 25 PM

When I clicked the nav bar on the right side of the documentation, it redirects me correctly, but incorrectly activated.

cc @maximsmol @angelinalg

Screen Shot 2023-03-14 at 5 36 12 PM

Link

No response

@rkooo567 rkooo567 added triage Needs triage (eg: priority, bug/not-bug, and owning component) docs An issue or change related to documentation labels Mar 15, 2023
@hora-anyscale hora-anyscale added P1 Issue that should be fixed within a few weeks and removed triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Mar 16, 2023
@hora-anyscale
Copy link
Contributor

Per Triage Sync: @maxpumperla assigning to you

@peytondmurray
Copy link
Contributor

This is due to a bug in an upstream dependency: executablebooks/sphinx-book-theme#678. Investigating workarounds now.

@peytondmurray
Copy link
Contributor

I looked into updating to sphinx-book-theme==1.0.1, the latest version. Happily, we can upgrade now without any conflicts with other dependencies, and it indeed solves the issue. We also would gain a lot of other benefits of upgrading; see #37944 for the issue dedicated to upgrading doc dependencies.

The downside is that the docs look completely different, a change that is way outside the scope of this issue and would best be discussed in the issue mentioned above. The other issue is that upgrading sphinx-book-theme is a problem with generate_nav_html, used in the sbt-sidebar-nav.html template:

       {{- generate_nav_html(
              startdepth=0,
              kind="sidebar",
              maxdepth=4,
              collapse=True,
              includehidden=True,
              titles_only=True,
              show_nav_level=theme_show_navbar_depth) }}

throws an exception. I'm not sure where this function is defined, but anyway we can't make use of it as-is. So we'd have to solve that issue as well.

For now I'm going to see if we can make a workaround with some other method (JS?)

@peytondmurray
Copy link
Contributor

After looking into this further, the issue is in how bootstrap's ScrollSpy behaves. Some people have reported that modifying a CSS rule seems to fix it, but when I load our docs I don't see any conflicting CSS rule here :/. I tried setting the appropriate rule anyway, but didn't see any change. This is supposed to get fixed in a later version of sphinx-book-theme anyway, so I think it might just be best to focus on upgrading our frontend build system entirely.

@peytondmurray
Copy link
Contributor

@maxpumperla @rkooo567 Now that #41115 is merged, can we close this? To be totally clear, this still won't always work as you might expect - for example, if there are two headings close to the bottom of the page, and you click on the last one, the second-to-last heading might be highlighted in the secondary sidebar because that's the heading the top of the window is closest to. But I think in most cases the behavior is sensible, so can we close this one out?

@peytondmurray
Copy link
Contributor

Closing this as complete - haven't heard of complaints about this yet with the new docs site. Please reopen if this is an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs An issue or change related to documentation P1 Issue that should be fixed within a few weeks
Projects
None yet
Development

No branches or pull requests

4 participants