hazelcast / hazelcast-docs-ui

User interface styles for the Hazelcast documentation playbook.
https://docs.hazelcast.com/
Mozilla Public License 2.0
6 stars 11 forks source link

Change the language of all tabs on the page #103

Open JakeSCahill opened 3 years ago

JakeSCahill commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

I agree, the second approach would be ideal.