backstage / mkdocs-techdocs-core

The core MkDocs plugin used by Backstage's TechDocs as a wrapper around multiple MkDocs plugins and Python Markdown extensions
Apache License 2.0
82 stars 61 forks source link

Table of Contents scrolling is broken #176

Closed kunickiaj closed 3 months ago

kunickiaj commented 3 months ago

Summary

It seems since #162 table of contents scrolling is broken. This is visible on the current demo site demo.backstage.io.

Essentially, if the table of contents on the left hand side is longer than the page content, it is not possible to scroll to see the rest of the table of contents.

Reproduction

This can be reproduced on demo.backstage.io by expanding some of the nested items in the toc and attempting to see them.

https://demo.backstage.io/docs/default/component/backstage/deployment/heroku/

Screenshot 2024-03-08 at 10 03 37 AM

This is not an issue with mkdocs-material itself as it works properly outside of backstage/techdocs.

Workaround

A temporary workaround I've implemented on our own instance is to create a techdocs-addon to override some css (since extra_css is not usable in techdocs). Specifically, setting .md-sidebar__scrollwrap style max-height: 65vh

jhsqsp commented 3 months ago

If it helps, we started getting reports of this issue after folks updated Chrome to 122. This doesn't affect Chrome 121. Firefox and Safari aren't affected either.

kunickiaj commented 3 months ago

Doesn't help in our case as we cannot downgrade users' Chrome and we don't permit other browsers.

johnphilip283 commented 3 months ago

Hey there - a fix went in that should be present in the next release: https://github.com/backstage/backstage/pull/23420. Sorry for the inconvenience!