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

Change the language of all tabs on the page #103

Open
JakeSCahill opened this issue Jun 8, 2021 · 2 comments
Open

Change the language of all tabs on the page #103

JakeSCahill opened this issue Jun 8, 2021 · 2 comments

Comments

@JakeSCahill
Copy link
Contributor

If users select a specific language tab, it usually means that they are working in that language.

For a better user experience, we should make all other tabs on the page focus on the user's selected language, similar to what Microsoft do.

cc @martijndeheus

@martijndeheus
Copy link

martijndeheus commented Jun 8, 2021

I looked into this a bit more. I am not able to solve it. It is a bit more complex than I expected, I think we would need a separate/new Asciidoc syntax for this behaviour.

I found the following two approaches:

1 - The first approach I found seems to be referred to as sticky tabs. This is what the Microsoft example does. It puts the current tab in the query parameters and all tab sets render this tab as seen in this url: https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=javascript#chaining.
This is some sample implementation I came across applicable to bootstrap, not sure if it is relevant.
This would also persist the tab when the link is copied, though I do not think this is very useful.

2 - The second approach I found here. This seems to also be build using Antora, but I could not find any source code related to it here. It uses groups to do this and automatically connects regular tabs with current group setting.

I think the second solution would be very nice. But I have no idea how to start to implement it.

@JakeSCahill
Copy link
Contributor Author

Thanks for looking into it @martijndeheus and for the detailed write-up!

I agree, the second approach would be ideal.

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

No branches or pull requests

2 participants