Skip to content

Support sticky tab selection #103

Closed

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

Activity

  1. added
    enhancement
    on Oct 25, 2022
  2. welcome commented on Oct 25, 2022

    @welcome

    Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

    If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

    If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

    Welcome to the EBP community! 🎉

  3. mikemckiernan commented on Oct 25, 2022

    @mikemckiernan
    ContributorAuthor

    I have an implementation but want to kick the tires a little longer. I also want to know if a contribution for these items is welcome or if there's a reason not to accept.

  4. chrisjsewell commented on Oct 25, 2022

    @chrisjsewell
    Member

    Heya, from a quick scan it sounds good cheers, and contributions are welcome 👍

  5. added a commit that references this issue on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions