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

navigation.indexes incompatible with navigation.sections #3070

Closed
5 tasks done
worldtiki opened this issue Oct 1, 2021 · 3 comments
Closed
5 tasks done

navigation.indexes incompatible with navigation.sections #3070

worldtiki opened this issue Oct 1, 2021 · 3 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@worldtiki
Copy link

worldtiki commented Oct 1, 2021

Contribution guidelines

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

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

The documentation says the navigation.indexes feature is compatible with all other feature flags however it doesn't seem to work if I enable navigation.sections.

When only navigation.indexes is enabled this feature works ok.
However when combined with navigation.sections then the section indices are no longer clickable.

nobug

bug

Expected behaviour

Both features should be compatible with each other.

Actual behaviour

Section indices are not clickable when both features are enabled.

Steps to reproduce

Enable both navigation.sections and navigation.indexes.

theme
  features:
    - tabs
    - navigation.tabs
    #- navigation.sections
    - navigation.indexes

Package versions

Using docker image: squidfunk/mkdocs-material:7.3.0

Configuration

site_name: My website
docs_dir: 'src'
site_dir: 'docs'

theme:
  name: material
  icon:
    logo: octicons/rocket-16
  favicon: 'images/favicon.ico'
  features:
    - tabs
    - navigation.tabs
    - navigation.sections
    - navigation.indexes
    - navigation.top
    - instant
    - navigation.tracking
  palette:
    primary: indigo
    accent: blue

plugins:
  - search:
     lang:
        - en

nav:
  - Potato:
      - Foo:
        - 'foo/index.md'
        - Something: 'foo/another_page'
      - Bar:
        - 'bar/index.md'
        - Something: 'bar/another_page'
  - Tomato:
      - Radars: 'something/something.md'

# Repository
repo_name: myrepo
repo_url: https://github.com/myrepo/
edit_uri: edit/master/src/

System information

  • Operating system: macOS Big Sur
  • Browser: Google Chrome latest
@squidfunk squidfunk added the bug Issue reports a bug label Oct 1, 2021
@squidfunk
Copy link
Owner

Thanks for reporting! Fixed in 12666a3.

Additionally, I took the time to restructure the navigation CSS and move to a flex-based approach, as it's now widely supported and seems to be more resilient when it comes to supporting all possible combinations of navigation features. I hope that this doesn't introduce any further regressions and have tested all thinkable combinations, including RTL languages to be sure. If it does, please open new issues. Navigation is a very, very complex beast after all.

Further improvements

  • When using navigation.tabs, top-level index pages were also not clickable before. This is now fixed.
  • Navigation index links will now always stretch to the available space. This means that when clicking into the whitespace between the link and chevron of an index page, the link is followed. Previously, nothing happened.
  • Some spacing adjustments related to navigation and source facts (bycatch) in 2d3354b

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Oct 2, 2021
@worldtiki
Copy link
Author

Amazing! Thank you 😊

@squidfunk
Copy link
Owner

Released as part of 7.3.1.

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