[BEAM-13229] side nav bug fixed by bullet03 · Pull Request #17731 · apache/beam

There seems to be a regression here. The language tab styling isn't working right. After selecting a language at the top of the page, you don't see the corresponding language tabs highlighted in the rest of the page.

The language highlighting functionality is really brittle and just ... hairy. I'd suggest not touching language-switch-v2.js unless you have to. If you do, make sure that any changes are not having unexpected side effects.

Hi David,
The language tab styling is working correctly now. The issue was caused by the refresh method of the scrollspy library, which resets tabs with 'active' classname. To solve it, I changed the name of the activated class from 'active' to 'activated'.

I had to change the language-switch-v2.js because we need eventListener with its click event inside. I tried to avoid changing the file, but couldn't come up with a better solution.