docs.scala-lang
docs.scala-lang copied to clipboard
Pages with TOCs not navigable when window width <= 768px
The table of contents is not visible on my phone, which makes it impossible to navigate the Scala Tour. I can reproduce this behavior on desktop by resizing the browser window to 768 pixels wide.
[description edited after clarification below]
Yes, this is by design. I wouldn't say that it's "impossible to navigate the site" though, is it? You just don't get a table of contents for the page you're viewing... You still have all other navigation (top navbar, footer, etc)
I should have said that it makes it impossible to navigate the tour. The top nav and footer have links to other parts of the site, but I don't see links to other pages of the tour. The intro page has in-line links to many of the pages of the tour, but not all of them. Am I missing something?
Aha, yes ok, you're right. The Scala Tour is a multi-page document that actually needs the table of contents to navigate. I guess it's the only exception on the site. Good point–so we should figure out a way to show a TOC for at least this one document...
The Scala Tour is a multi-page document that actually needs the table of contents to navigate. I guess it's the only exception on the site.
@heathermiller it also affects many other pages:
- http://docs.scala-lang.org/style/index.html
- http://docs.scala-lang.org/overviews/reflection/overview.html
- http://docs.scala-lang.org/overviews/macros/usecases.html
- http://docs.scala-lang.org/overviews/quasiquotes/setup.html
- http://docs.scala-lang.org/overviews/collections/introduction.html
- http://docs.scala-lang.org/overviews/parallel-collections/overview.html
- http://docs.scala-lang.org/overviews/scaladoc/overview.html
- http://docs.scala-lang.org/sips/index.html
the tour sections have "previous" and "next" links now, but that doesn't help the other pages.
These lines are what cause the TOC to be hidden when the page width is less than 768px:
https://github.com/scala/docs.scala-lang/blob/44840f559bff75de755b04c457838d046c5edbd4/_sass/layout/toc.scss#L6-L8
Should this just be removed? If it were, the TOC would always be visible, even on small screens. TOC isn't that big, not sure why it would need to be hidden. The fact that the issue has been duplicated a couple of times already makes the case that hiding it is a problem.
And forcing it to appear only for certain pages would be complicated. (Maybe there would be a flag in the article's markdown that causes a class to be added or removed from the TOC div and the css in the media query includes that class, or :not()?)
Or just always show the TOC.