Closed santaimpersonator closed 6 months ago
Thanks for reporting. When creating a minimal reproduction, you should not pack up your site but create a new project with the smallest possible content that showcases the problem. It is absolutely mandatory to provide a minimal reproduction, so we can investigate. We cannot work on a site with hundreds or thousands of pages – it just takes too long.
I'll work on processing my commits to the project, so I can submit a reproduction later this week
We'll reopen this issue when we receive a proper reproduction. Without a reproduction, it is unclear whether the problem is within our code base or hides within your customizations. As can be seen from the screenshots, your site seems to customize Material for MkDocs quite heavily. Closing as incomplete.
@squidfunk I understand the need for a reproduction, which is why I originally left that box unchecked. I just needed some time to get all my commits sorted out, so I didn't lose my work. Sometimes GitHub Desktop gets confused when I copy a repository 😅
I reduced the reproduction without the customizations. I have uploaded the file and updated the reproduction steps (but not the images).
9.5.13+insiders.4.53.1-tabs-issue.zip
mkdocs serve
PPS Output
section is linked and hover over it
Chrome DuckDuckGo
Thanks for the reproduction. It's still 17 MB due to the images, but I will check if we can work with it.
Here is a more basic doc with just the tabbed content and instant preview features:
9.5.13+insiders.4.53.1-really-basic.zip
When you hover over the link... you only see the tab title and not of the content:
Thanks! I'll look into it ☺️
Thanks again for reporting and providing the excellent reproduction. Contrary to the title of the reproduction that might have assumed this is a really basic issue, I'm afraid it isn't. Linking of instant previews is currently limited to sites and sections within that site. It does not work with linked content tabs because of how the HTML is structured.
Instant previews fetch the site they point to, then search for the anchor which currently must point to a headline, and extract all content until the next headline. The structure (schematic) is:
Headline#id-1
Content for Headline#id-1
Headline#id-2
Content for Headline#id-2
...
It currently does not work with generic anchors, and it will likely never work with tabs, because of the kind of "odd" HTML structure to make tabs work without JavaScript. The structure for content tabs is:
Tabs
TabControl#id-1
TabControl#id-2
...
TabLabels
TabLabel for TabControl#id-1
TabLabel for TabControl#id-2
...
TabContent
TabContent for TabControl#id-1
TabContent for TabControl#id-2
...
This means that we would need to somehow add very specific logic to support referencing of the content associated with a tab to instant previews, which is (currently) too much of an ask. We're still iterating on the basic mechanics and need to keep the scope limited, first fixing all issues we encounter with the current basic functionality, which we then can evaluate to extend later on. Material for MkDocs is used by thousands of users, and everybody uses it a little differently, so we always try to start with a sharp focus and slowly expand once incoming bugs start to cease.
Thus, it's currently not planned, but we will re-evaluate once we consider instant previews stable ☺️ I've adjusted the documentation to better reflect those limitations in fdeafbb87.
Context
No response
Bug description
When enabling the instant preview feature, the rendering of a linked content tab only show the tabs and not the content below:
Related links
Reproduction
Unfortunately, the build file for the reproduction was 80MB (and too big); probably due to all the images stored. (*I'll work on processing my commits to the project, so I can submit a reproduction later this week)
However, the site can be reproduced from our repository: https://github.com/sparkfun/SparkFun_GNSS_mosaic-X5
Just enable the instant preview feature globally:
Steps to reproduce
mkdocs.yml
filemkdocs.yml
file)PPS Output
section is linked and hover over itBrowser
Chrome
Before submitting