executablebooks / sphinx-design

A sphinx extension for designing beautiful, screen-size responsive web components.
https://sphinx-design.readthedocs.io/en/furo-theme/
MIT License
187 stars 57 forks source link

✨ NEW: sync tabs by URL query parameters #196

Closed chrisjsewell closed 1 month ago

chrisjsewell commented 1 month ago

Synchronised tabs can now be selected by adding a query parameter to the URL, for that sync-group, such as ?code=python for

.. tab-set-code::

    .. literalinclude:: snippet.py
        :language: python

    .. literalinclude:: snippet.js
        :language: javascript

The last selected tab key, per group, is also persisted to SessionStroage

codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.87%. Comparing base (a6f97b8) to head (c60c1a0).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #196 +/- ## ========================================== + Coverage 87.81% 87.87% +0.05% ========================================== Files 11 11 Lines 1026 1031 +5 ========================================== + Hits 901 906 +5 Misses 125 125 ``` | [Flag](https://app.codecov.io/gh/executablebooks/sphinx-design/pull/196/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks) | Coverage Δ | | |---|---|---| | [pytests](https://app.codecov.io/gh/executablebooks/sphinx-design/pull/196/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks) | `87.87% <100.00%> (+0.05%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

chrisjsewell commented 1 month ago

@mikemckiernan I added you as co-author thanks!

I changed #104, to allow for specifying the sync-group name, rather than having a single config variable.