GitbookIO / gitbook

The open source frontend for GitBook doc sites
https://www.gitbook.com
GNU General Public License v3.0
26.51k stars 3.81k forks source link

Feature request - global tabs settings #2278

Open maral opened 1 month ago

maral commented 1 month ago

Hi, I am wondering if it's possible to implement a globally switchable tabs, that would switch to the option in all tabs across the documentation. E.g. when documenting an API, you might have multiple languages in the tab (let's say JS, TS, Python). The documentation would have those three languages in all the different code showcases. If the user switches for the first code showcase to Python, it would make sense to show all the other showcases in Python, too.

I listed through various documentations using Gitbook and I found an example, where this function would make sense: https://docs.warp.dev/features/blocks/block-basics

The Linux user reading the documentation has to keep manually switching to Linux tab everywhere. Having a global state would happen to be perfect here and I believe that is the case in many such use-cases. It's pretty common in the JS/TS world, see e.g. https://nextjs.org/docs/app/building-your-application/optimizing/fonts

Thanks!