docs icon indicating copy to clipboard operation
docs copied to clipboard

Language tabs should be URL-aware

Open mattwynne opened this issue 3 years ago • 5 comments

I want to link someone to the Ruby version of https://cucumber.io/docs/cucumber/state/ but the URL doesn't change when I switch language tabs.

I'd like the language tabs to:

  1. Switch to the appropriate language tab on opening a page if a querystring parameter is present (e.g. ?lang=ruby)
  2. Update the URL if the language tab is changed (could be dynamic or by just hyperlinking to the new URL)

How would we achieve this?

mattwynne avatar Jun 23 '21 15:06 mattwynne

@mattwynne, @aurelien-reeves I would like to take this on. So if it is still relevant, please assign this to me :)

10xtechie avatar Jun 22 '22 19:06 10xtechie

Yay! thanks @10xtechie yes it's absolutely still relevant!

https://calendly.com/mattwynne if you want to pair.

mattwynne avatar Jun 22 '22 21:06 mattwynne

I think the code for the tabs is here: https://github.com/cucumber/docs/blob/main/themes/cucumber-sb/static/js/site.js

mattwynne avatar Jun 22 '22 21:06 mattwynne

@mattwynne @aurelien-reeves , Thanks for assigning this to me! I have created a PR, please take a look.

10xtechie avatar Jun 23 '22 15:06 10xtechie

I think the code for the tabs is here: https://github.com/cucumber/docs/blob/main/themes/cucumber-sb/static/js/site.js

@mattwynne , You are right, thanks!

10xtechie avatar Jun 23 '22 15:06 10xtechie