Re: [PATCH RFC] docs: Add more information to the HTML sidebar

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 3, 2023 at 8:07 AM Akira Yokosawa <akiyks@xxxxxxxxx> wrote:
>
> On Fri, 20 Jan 2023 08:19:02 -0700, Jonathan Corbet wrote:
> > Akira Yokosawa <akiyks@xxxxxxxxx> writes:
> >
> >>>> Thoughts?  Is this headed in the right direction?  This view of the TOC
> >>>> is readily available from Sphinx; if we want something else it's going
> >>>> to be rather more work.
> >>
> >> I think this looks like the right direction. But how far do you want to
> >> mimic RTD's sidebar???
> >
> > Well ... that is kind of my question for all of the folks who are
> > unhappy with the current sidebar.  What would you like to see there?
> >
> > Things like sidebar width, whether bullets are used (I'd deliberately
> > taken them out as excess noise), which text is which color, etc. are all
> > just CSS; we can paint that shed any color we like.  The harder part is
> > deciding which information we want to have there in the first place.  So
> > ... is the set of links shown in the new sidebar close to what we
> > want...  too much stuff?  Something missing?
>
> Seeing no response from anyone so far, I feel like I need to express
> my personal view. As you might already be well aware of, I love the
> site navigation of RTD both on large screens and small (narrow) screens.
>
(+1) to this. I too prefer the site navigation of RTD over Alabaster.

> On *what* should be in the sidebar, I don't see anything missing
> give or take the toctree depth.
>
> To my eyes, there is two deficiencies with the alabaster theme in site
> navigation.
>
>   - Even with this RFC patch amended with the diff I suggested in
>     https://lore.kernel.org/linux-doc/6b2e496f-d7f6-abea-6bbd-4b12fea76a68@xxxxxxxxx/,
>     there remain "Where am I???" moments when jumping to a different page.
>     In such jumps, alabaster's sidebar always reset to top with the
>     main pane. RTD's sidebar keeps its position so there is no such
>     moment.
>
>   - On small/narrow screens, alabaster's sidebar is pushed downward
>     to the bottom of the page. This means you typically need three
>     steps to see where you are when jumping to another page:
>
>       1) Jump to another page.
>       2) Scroll to the bottom.
>       3) See where you are.
>
>     With RTD, you don't need to scroll to the bottom. Sidebar is there
>     behind an icon at the top-left which is often used as "menu" icon.
>
>       1) Jump to another page.
>       2) Open sidebar and it tells you where you are.
>
Adding to what Akira says, what I really would like to see is a TOC in the
sidebar that shows all parts, with the current part expanded at all times.
For instance, the sidebar should expand and appear as follows when
I click the KUnit documentation's main index page:

KUnit - Linux Kernel Unit Testing
      Getting Started
      KUnit Architecture
      Run tests with KUnit
      Introduction
      Unit Testing

When the 'Introduction' item is  selected, the toc in the sidebar should get
updated as follows:

KUnit - Linux Kernel Unit Testing
Getting Started
KUnit Architecture
Run tests with KUnit
Introduction
    Features
    Prerequisites
Unit Testing

Currently, only the second-level headings exhibit the above behaviour,
as seen here:
https://static.lwn.net/kerneldoc/dev-tools/index.html

Applying this to third-level headings, which are significant in KUnit
docs, would be helpful.
It will make it easier for us to always know where we are
on this website because it displays the parent, sibling, and child
nodes of the current
page.

> I don't know if alabaster can be managed to behave similar to RTD
> with a reasonable effort.
>
>         Thanks, Akira
>
>
> >
> > Thanks,
> >
> > jon

Thanks,
Sadiya



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux