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

Current tab detection breaks if the section has only subsections #2098

Closed
3 of 5 tasks
oprypin opened this issue Dec 8, 2020 · 6 comments
Closed
3 of 5 tasks

Current tab detection breaks if the section has only subsections #2098

oprypin opened this issue Dec 8, 2020 · 6 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@oprypin
Copy link
Contributor

oprypin commented Dec 8, 2020

I've found a bug and checked that ...

  • ... the problem doesn't occur with the default MkDocs template
  • ... the problem is not in any of my customizations (CSS, JS, template)
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

If tabbed navigation is enabled and a tab's nav items include only subsections, not any pages, then the tab may not be detected as active.

Expected behavior

The current tab is highlighted
(which it is in this case, but only for the first subsection)

image

Actual behavior

Selecting any item under the 2nd section onwards makes the tab not highlighted anymore

image

Steps to reproduce the bug

mkdir -p docs/taba docs/taba/bar docs/taba/foo docs/tabb
touch docs/taba/bar/bar.md docs/taba/bar/barr.md docs/taba/foo/foo.md docs/taba/foo/fooo.md docs/tabb/b.md                                                                                    
cat >mkdocs.yml

Package versions

Project configuration

site_name: Hmm
theme:
  name: material
  features:
    - navigation.tabs

System information

  • Browser: Firefox and Chromium
@squidfunk
Copy link
Owner

Thanks for reporting! As with #2060 and #2072, it makes the most sense to revisit and solve this problem when the new navigation features are merged into master.

@squidfunk squidfunk added blocked Issue is blocked by another issue bug Issue reports a bug labels Dec 9, 2020
@squidfunk
Copy link
Owner

This issue has been resolved as part of #2072. As #2072 (comment) explains, the bugfix will be released with the hit of the next Insiders funding goal. This is an exception to the usual policy of providing bugfixes for both editions, due to the fact that navigation has undergone a big refactoring. As I'd consider this to be a minor bug (i.e. wrong link color), it doesn't justify the effort of backporting the fix. I hope for your understanding - it shouldn't take more than a few weeks after all.

@squidfunk squidfunk added resolved Issue is resolved, yet unreleased if open insiders and removed blocked Issue is blocked by another issue labels Dec 13, 2020
@squidfunk
Copy link
Owner

The funding goal has been reached and the respective features and fixes have just been merged from Insiders. The master is already up to date - watch out for a release.

@oprypin
Copy link
Contributor Author

oprypin commented Dec 21, 2020

This is indeed fixed, thanks.
I would close this issue but not sure if that's the process that you're following.

@squidfunk
Copy link
Owner

I'm still trying to figure out whether we should start with a beta release – we'll close this issue when the fix is released.

@squidfunk
Copy link
Owner

6.2.1 was just released, which includes the fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants