sphinx-design
sphinx-design copied to clipboard
[ENH] Sticky sync tabs and URL param
Addresses https://github.com/executablebooks/sphinx-design/issues/103.
Add a Sphinx configuration option that is named
sphinx_design_sync_tabs_storage_key so that I can set a project-specific local storage key rather than risk clobbering the value for sphinx-design-last-tab across different projects.
Add support for a URL search param ?tab=blah
so that I can copy and paste a URL and the receiver sees the tab
content that I see. The URL search param is set in browser
local storage when you click a tab.
If you visit a URL with search param ?tab=blah, set the
local storage value to blah. If blah matches
a synchronization key for a tab, show the tab.
Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.
Welcome to the EBP community! :tada:
@chrisjsewell , please let me know if there's something I need to do before a review. Also, I'm completely open to suggestion on changes.
Hey @mikemckiernan, sorry I wasn't able to look at this just yet, maybe @choldgraf could have a quick look?
Yep, it'd be great if @choldgraf could peek and provide feedback. I appreciate everyone's time and help. Great project too!
@choldgraf , thanks for the feedback. PLMK if there's anything else you'd like changed or that I can clarify.
@choldgraf , @chrisjsewell , can I get another look at this PR? I'd like to get my org to bring in this change from upstream. Thanks and let me know if there's anything else to revise.
@choldgraf this is still awaiting your feedback
@choldgraf , @chrisjsewell , any chance of another look? I'm running out of runway. Thanks very much.
We need #119 or #120 first though.
In our project we used to use sphinx-tabs which already has this feature. Maybe sphinx-design could adopt that method? https://github.com/executablebooks/sphinx-tabs/blob/master/sphinx_tabs/static/tabs.js. It has the advantage of not cluttering the URL.