sphinx-tabs icon indicating copy to clipboard operation
sphinx-tabs copied to clipboard

Select which tab to focus

Open mklomp opened this issue 3 years ago • 4 comments

Description / Summary

It would be nice if it could be possible to auto-select a tab on load. At the moment the first tab is always active.

Value / benefit

In order to explain the user what to type in which terminal I am planning on using tabs to show the 'status' of multiple linux terminals. It would help if the new 'terminal' tab would the be active.

Implementation details

No response

Tasks to complete

No response

mklomp avatar Sep 06 '21 08:09 mklomp

I'm not clear what the "new" tab references here. Are tabs being dynamically added on a page in this use case? If yes, I'd recommend using custom JavaScript to select the new tab.

Otherwise, please could you provide more details on:

  1. The behaviour you'd like to see
  2. How you'd like to specify this behaviour in markdown

foster999 avatar Sep 06 '21 20:09 foster999

I'd imagine it would be similar to the selected option in https://sphinx-design.readthedocs.io/en/furo-theme/tabs.html#tab-item-options 😉

chrisjsewell avatar Sep 06 '21 20:09 chrisjsewell

Cheers @chrisjsewell - what happens here if a user marks multiple tabs as selected in a set?

foster999 avatar Sep 07 '21 07:09 foster999

@foster999, as far as I can see this would indeed be similar to the selected option mentioned by @chrisjsewell. I see that my description with the 'new' tab indeed might be a bit unclear ;).

mklomp avatar Sep 07 '21 09:09 mklomp