You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "David Huntsperger (Jira)" <ji...@apache.org> on 2022/04/14 20:10:00 UTC

[jira] [Comment Edited] (BEAM-14220) Code snippets are completely hidden on pages with code snippets for just one language

    [ https://issues.apache.org/jira/browse/BEAM-14220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17522522#comment-17522522 ] 

David Huntsperger edited comment on BEAM-14220 at 4/14/22 8:09 PM:
-------------------------------------------------------------------

It looks like there's another problem with the the language switcher logic: [https://github.com/apache/beam/blob/master/website/www/site/assets/js/language-switch-v2.js]

If the last selected language (or the default language, which is java) does not match the language of the tab, this line hides the code snippet: [https://github.com/apache/beam/blob/master/website/www/site/assets/js/language-switch-v2.js#L116]

But that toggling logic is also required to properly display the selected language, if other language tabs are present. I suspect that there's going to be some non-trivial refactoring required, to get all combinations of language tab to work as expected.

 


was (Author: pcoet):
It looks like there's another problem with the the language switcher logic: [https://github.com/apache/beam/blob/master/website/www/site/assets/js/language-switch-v2.js]

If the last selected language (or the default language, which is java) does not match the language of the tab, this line hides the code snippet: [https://github.com/apache/beam/blob/master/website/www/site/assets/js/language-switch-v2.js#L116]

But I think that toggling logic is also required to properly display the selected language, if other language tabs are present. I suspect that there's going to be some non-trivial refactoring required, to get all combinations of language tab to work as expected.

 

> Code snippets are completely hidden on pages with code snippets for just one language
> -------------------------------------------------------------------------------------
>
>                 Key: BEAM-14220
>                 URL: https://issues.apache.org/jira/browse/BEAM-14220
>             Project: Beam
>          Issue Type: Bug
>          Components: website
>            Reporter: Brian Hulette
>            Assignee: David Huntsperger
>            Priority: P2
>
> The Java/Python/Go toggle is preserved between pages. Some pages, like the DataFrame API Overview (BEAM-13371), and [Python type hint guidance|https://lists.apache.org/thread/t1fonotpj6nzllwx5m9ykmrxpy9hqd1n] only have a single language, and if the toggle is stuck on a different language, the code snippets are completely hidden.
> A workaround is to go to a page with other languages, like the [Programming Guide|https://beam.apache.org/documentation/programming-guide/], and select the appropriate language, then navigate back.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)