Skip to content

Support sticky tab selection #103

@mikemckiernan

Description

@mikemckiernan

Context

Tab selection should be sticky.

  • When I browse a previously-viewed page in a new browsing session, show the prog-lang of the previously viewed tab.
  • When I browse to another page in the same project, show the prog-lang of the previously viewed tab.
  • Provide a per-project configuration option for the browser local storage key so that projects do not clobber sphinx-design-last-tab.
  • Provide a mechanism for sharing a URL that opens a particular tab. At the moment, I think this has to be a URL param.

In another executable books project, these items were also requested:

Proposal

Modify sd_tabs.js:

  • If I select a tab on a page that uses synchronized tabs, set my choice in browser local storage and add a URL search param with the value of the synchronization key.
  • If I browse to a page that uses synchronized tabs, and I have a synchronization key in browser local storage, show the tab that corresponds to the key. Also update the URL search param with the value of the synchronization key.

Modify extension.py to support a Sphinx configuration option, sphinx_design_sync_tabs_storage_key so that projects can set a unique alternative to sphinx-design-last-tab key for browser local storage.

Tasks and updates

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions