Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ NEW: sync tabs by URL query parameters #196

Merged
merged 1 commit into from
May 22, 2024
Merged

✨ NEW: sync tabs by URL query parameters #196

merged 1 commit into from
May 22, 2024

Conversation

chrisjsewell
Copy link
Member

@chrisjsewell chrisjsewell commented May 22, 2024

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

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

codecov-commenter commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.87%. Comparing base (a6f97b8) to head (c60c1a0).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            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 Coverage Δ
pytests 87.87% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chrisjsewell chrisjsewell merged commit a05b744 into main May 22, 2024
15 checks passed
@chrisjsewell chrisjsewell deleted the tab-sync branch May 22, 2024 22:05
chrisjsewell added a commit that referenced this pull request May 22, 2024
Synchronised tabs can now be selected by adding a query parameter to the URL, for that sync-group, such as `?code=python` for

```restructuredtext
.. 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`

Co-authored-by: Mike McKiernan <mmckiernan@nvidia.com>
@chrisjsewell
Copy link
Member Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants