executablebooks / sphinx-tabs

Tabbed views for Sphinx
https://sphinx-tabs.readthedocs.io
MIT License
264 stars 68 forks source link

Remember last `group-tab` selection between pages #80

Closed foster999 closed 3 years ago

foster999 commented 4 years ago

Is your feature request related to a problem? Please describe.

I'd like the group-tab selection to persist between different pages. For example, consider a book containing code snippets in multiple languages. Users might like to select a particular language to reference throughout the book, rather than selecting that language's tab on each page.

Describe the solution you'd like

I'd considered storing the last group-tab selection in the session, so that it persists between pages (i.e. across a jupyter-book). Would be great to know if there's a more appropriate way to do this.

shireenrao commented 3 years ago

This would be a great enhancement!

foster999 commented 3 years ago

Will give this a try after JS is cleaned up in #87