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

nested nav submenu not working in mobile mode #1107

Closed
sander76 opened this Issue Dec 9, 2016 · 6 comments

Comments

Projects
None yet
3 participants
@sander76

sander76 commented Dec 9, 2016

Mkdocs allows for nested menu's. But as described in the below bootstrap issue nested nav menu's are not working in mobile mode (you need to hover the item which is impossible on mobile).

twbs/bootstrap#16387

For my mkdocs usages I am hoping to be able to use the following menu structure. But it should also work on mobile. Anyone a suggestion ?

- Products
  -- Product1 
      -- Datasheet
      -- Manual
      -- Quickstart guide
  -- Product2
     -- etc.
@waylan

This comment has been minimized.

Show comment
Hide comment
@waylan

waylan Dec 9, 2016

Member

Our mkdocs theme is built on top of bootstrap version 2.x. As the Bootstrap issue points out, mobile mode is broken so naturally that carries through to MkDocs. In other words, we would consider this to be something that should be addressed upstream (by Bootstrap). However, that issue also mentions that nested dropdowns have been completely removed in Bootstrap 3. We have two options:

  1. Revert back to only allowing two levels in our navigation.
  2. Patch our local copy of Bootstrap.

Between this and the problems with #1042, I'm leaning more and more toward option 1.

Member

waylan commented Dec 9, 2016

Our mkdocs theme is built on top of bootstrap version 2.x. As the Bootstrap issue points out, mobile mode is broken so naturally that carries through to MkDocs. In other words, we would consider this to be something that should be addressed upstream (by Bootstrap). However, that issue also mentions that nested dropdowns have been completely removed in Bootstrap 3. We have two options:

  1. Revert back to only allowing two levels in our navigation.
  2. Patch our local copy of Bootstrap.

Between this and the problems with #1042, I'm leaning more and more toward option 1.

@sander76

This comment has been minimized.

Show comment
Hide comment
@sander76

sander76 Dec 14, 2016

I hope not. I think being a documentation site you should be able to structure your documents deeper than 1 level.
I am currently looking for some solutions to have the menus clickable..

sander76 commented Dec 14, 2016

I hope not. I think being a documentation site you should be able to structure your documents deeper than 1 level.
I am currently looking for some solutions to have the menus clickable..

@d0ugal

This comment has been minimized.

Show comment
Hide comment
@d0ugal

d0ugal Dec 14, 2016

Member

More options. None are ideal.

  1. Only allow two levels on that theme. Just like the other bootswatch themes don't support further nesting.
  2. Don't support mobile on that theme.
Member

d0ugal commented Dec 14, 2016

More options. None are ideal.

  1. Only allow two levels on that theme. Just like the other bootswatch themes don't support further nesting.
  2. Don't support mobile on that theme.
@waylan

This comment has been minimized.

Show comment
Hide comment
@waylan

waylan Dec 15, 2016

Member

I hope not. I think being a documentation site you should be able to structure your documents deeper than 1 level.

I would have said the same thing a few months back. But the more I've worked with it, the less convinced I am that that should be the case. In fact, Sphinx only allows one level of nesting. Actually, it requires it; aside from the home page, all pages must be nested under a section, but no more than one level deep and each section heading does not point to a page at all. The trick is that the pages can be arranged in the file system however you want. Its the navigation structure that is limited. The same applies to MkDocs. Your navigation does not need to mirror the file system structure. If the much larger (and feature rich) Sphinx can get by with those restrictions, I wonder why we can't.

I'm not saying we should just do what everyone else does, but given the maintenance headaches adding support for multi-level nesting has caused, I'm thinking that change was a mistake/feature creep.

Member

waylan commented Dec 15, 2016

I hope not. I think being a documentation site you should be able to structure your documents deeper than 1 level.

I would have said the same thing a few months back. But the more I've worked with it, the less convinced I am that that should be the case. In fact, Sphinx only allows one level of nesting. Actually, it requires it; aside from the home page, all pages must be nested under a section, but no more than one level deep and each section heading does not point to a page at all. The trick is that the pages can be arranged in the file system however you want. Its the navigation structure that is limited. The same applies to MkDocs. Your navigation does not need to mirror the file system structure. If the much larger (and feature rich) Sphinx can get by with those restrictions, I wonder why we can't.

I'm not saying we should just do what everyone else does, but given the maintenance headaches adding support for multi-level nesting has caused, I'm thinking that change was a mistake/feature creep.

@waylan

This comment has been minimized.

Show comment
Hide comment
@waylan

waylan Dec 15, 2016

Member
  1. Only allow two levels on that theme. Just like the other bootswatch themes don't support further nesting.

That's not a bad compromise. We can leave the pages config as-is, allowing it to be nested however deep people want. But the individual themes may or may not support more than one level of nesting. Someone could develop a third-party theme with good multi-level nesting while we continue to maintain a simple, easy to maintain, one level of nesting theme. The entire issue is resolved with some documentation.

Member

waylan commented Dec 15, 2016

  1. Only allow two levels on that theme. Just like the other bootswatch themes don't support further nesting.

That's not a bad compromise. We can leave the pages config as-is, allowing it to be nested however deep people want. But the individual themes may or may not support more than one level of nesting. Someone could develop a third-party theme with good multi-level nesting while we continue to maintain a simple, easy to maintain, one level of nesting theme. The entire issue is resolved with some documentation.

@sander76

This comment has been minimized.

Show comment
Hide comment
@sander76

sander76 Dec 15, 2016

I agree. Keep the internals intact, let a separate theme solve the nesting

sander76 commented Dec 15, 2016

I agree. Keep the internals intact, let a separate theme solve the nesting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment