pydata-sphinx-theme icon indicating copy to clipboard operation
pydata-sphinx-theme copied to clipboard

Consider implementing a within-page top bar for buttons

Open choldgraf opened this issue 5 years ago • 5 comments

Since we've implemented that "Edit this Page" button in the right sidebar, it has been bugging me and I'm not sure why.

I think it is because I categorize the right sidebar as a purely "TOC" section, and so it is confusing to me that there's both the TOC and other buttons in the same section.

What do people think about instead implementing a different section of the page explicitly for arbitrary "button-like" components?

An example would be a within-page topbar. This has been a useful pattern in jupyter book and is also used in bookdown. It could be a way to modularize the page more clearly and extensibly.

choldgraf avatar Feb 15 '20 22:02 choldgraf

I think it is because I categorize the right sidebar as a purely "TOC" section, and so it is confusing to me that there's both the TOC and other buttons in the same section.

You could also see it as "page related", which includes things like the TOC of this page or a button to edit this page. (but yeah, you can't tell people how to see it .. :-))

The within page topbar (eg in bookdown as you mentioned: https://bookdown.org/yihui/bookdown/#) seems nice as such, but I don't know how well it would integrate / fit with the already existing top bar.

But it sounds useful to think about this. Also a button to trigger the TOC sidebar (as in the linked examples) would be useful.

jorisvandenbossche avatar Feb 16 '20 13:02 jorisvandenbossche

To me it's hard to know if the page will feel too cluttered until we mock-up something to look at. For a within-page topbar, I think it'd be important that it is relatively short in height and unobtrusive, with consistently-styled buttons in it.

choldgraf avatar Feb 21 '20 17:02 choldgraf

I did a quick mock-up of what I had in mind. This is the current layout:

chrome_fIaWq83qn9

I imagined something like this:

image

Where the right sidebar is reserved only for TOC, and above the page title there is a small layer that has "buttons" relevant to the page (and one special button for collapsing the left sidebar, if readers wish). This could be extended for things like download links or page-level buttons.

What do you think?

choldgraf avatar Feb 29 '20 01:02 choldgraf

I much prefer this at the bottom, since 99% of users do not want to edit this page. See e.g. Docusaurus:

Screen Shot 2021-05-07 at 3 24 41 PM

(Taken from https://framework.frictionlessdata.io/docs/guides/guides-overview)

jpmckinney avatar May 07 '21 19:05 jpmckinney

Interesting idea- so that lives at the bottom of the page content rather than say a fixed position at the bottom.

choldgraf avatar May 08 '21 15:05 choldgraf

in v0.13 an article header have been implemente (https://pydata-sphinx-theme--1174.org.readthedocs.build/en/1174/user_guide/layout.html#layout-article-header). Do you think we can close this issue ?

12rambau avatar Jun 13 '23 20:06 12rambau