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

[Bug] tabs get nested #3880

Closed
3 of 5 tasks
Realvincentyuan opened this issue May 3, 2022 · 1 comment
Closed
3 of 5 tasks

[Bug] tabs get nested #3880

Realvincentyuan opened this issue May 3, 2022 · 1 comment

Comments

@Realvincentyuan
Copy link

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

Below code can render tabbed content, but the tabs will stay on one line, if the list of tabs is very long, and users click the last a few tabs, it does not allow to scroll back.

=== "C"

    ``` c
    #include <stdio.h>

    int main(void) {
      printf("Hello world!\n");
      return 0;
    }
    ```

=== "C++"

    ``` c++
    #include <iostream>

    int main(void) {
      std::cout << "Hello world!" << std::endl;
      return 0;
    }
    ```

Expected behaviour

I recalled in the prior versions, the tab list is not folded in one line, meaning they will all be listed, so that uses can click wherever they want to go. I think this is a good idea.

Actual behaviour

Tabs stay on one line, if the list of tabs is very long, and users click the last a few tabs, it does not allow to scroll back.

Steps to reproduce

  1. Create long tabbed content, say 10 tabs
  2. Click the last a few tabs
  3. It cannot scroll back to the first a few tabs

Package versions

  • Python: 3.6.9
  • MkDocs: 1.3.0
  • Material: 8.2.8

Configuration

Only relevant configs are pasted: 
 
 - pymdownx.tabbed:
      alternate_style: true
  - pymdownx.tasklist:
      custom_checkbox: true
      clickable_checkbox: true
  - pymdownx.tilde
  - pymdownx.superfences:
      custom_fences:
        - name: mermaid
          class: mermaid
          format: !!python/name:pymdownx.superfences.fence_code_format

System information

  • Operating system: Win10
  • Browser: chrome
@squidfunk
Copy link
Owner

Thanks for reporting. As I understand, you want this behavior back:

128566488-f37bbfd4-c5c1-4a1a-bbd8-68ae59afa6ae

Since this has severe problems on mobile, especially with many, many content tabs, we switched to the new approach that allows for a scrollable tab container. You can infact go back, you just need to scroll back. If you want the old behavior back, you'd need to downgrade Material for MkDocs to 7.x.x, which was the last version supporting the legacy tab behavior.

Additionally, watch out for #3531, which will be tackled soon. We're going to add tab indicators and improve the UI/UX of the current solution. Since there's nothing for us to act on, I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants