Skip to content

Conversation

@panbingkun
Copy link
Contributor

When a user chooses a different language for a code snippet, all code snippets on that page should switch to the chosen language. This was the behavior for, for example, Spark 2.0 doc: https://spark.apache.org/docs/2.0.0/structured-streaming-programming-guide.html

But it was broken for later docs, for example the Spark 3.4.1 doc: https://spark.apache.org/docs/latest/quick-start.html

We should fix this behavior change and possibly add test cases to prevent future regressions.

Jira: https://issues.apache.org/jira/browse/SPARK-44820

@panbingkun
Copy link
Contributor Author

panbingkun commented Aug 24, 2023

cc @zhengruifeng
This is just taking 3.1.1 as an example. If there is ok, I will update all versions after 3.1.1.
I have manually tested it on Chrome and Safari.

@panbingkun panbingkun closed this Aug 24, 2023
@allisonwang-db
Copy link
Contributor

Hi @panbingkun this is an important bug fix and we should merge it! Shall we re-open this?

@panbingkun
Copy link
Contributor Author

panbingkun commented Sep 22, 2023

Hi @panbingkun this is an important bug fix and we should merge it! Shall we re-open this?

Actually, this feature has been fixed in Spark project, apache/spark#42657
The current fixes are: master, branch-3.5 (apache/spark#42657), and branch-3.4 (apache/spark#42989)

We have two options for the logic of history

  1. It may be necessary to recompile the document and publish it again.
  2. Directly changing historical files in the Spark website project.

@allisonwang-db
Copy link
Contributor

Yea we should apply the change in the spark repo to the actual released Spark website docs here. @panbingkun which option do you think is better?

@panbingkun
Copy link
Contributor Author

panbingkun commented Sep 22, 2023

Yea we should apply the change in the spark repo to the actual released Spark website docs here. @panbingkun which option do you think is better?

If we are not suitable for republishing historically published documents, we can only manually update them on Spark website. If necessary, I can complete it.

@allisonwang-db
Copy link
Contributor

@panbingkun yes let's update the spark website (this repo) to fix this UI issue for published docs.

@panbingkun
Copy link
Contributor Author

panbingkun commented Sep 25, 2023

@panbingkun yes let's update the spark website (this repo) to fix this UI issue for published docs.

Okay, let me to fix it.
A new PR: #480

HyukjinKwon pushed a commit that referenced this pull request Sep 29, 2023
… across docs for all code snippets

The pr aims to fix UI issue for `published docs` about Switch languages consistently across docs for all code snippets

#474 (comment)
<img width="912" alt="image" src="https://github.com/apache/spark-website/assets/15246973/50b86a6f-4bde-4444-93bf-cb85b66e962c">

As discussed, we aim to fix the aforementioned issues by directly repairing files that have already been released in history.

include versions:
3.1.1, 3.1.2, 3.1.3, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.4.0, 3.4.1

Manually test:
```
bundle exec jekyll serve --watch
```

Author: panbingkun <pbk1982@gmail.com>

Closes #480 from panbingkun/fix_history_switch.
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

Successfully merging this pull request may close these issues.

2 participants