Skip to content

Conversation

@HyukjinKwon
Copy link
Member

What changes were proposed in this pull request?

This PR proposes to recover the availity of switching languages consistently across docs for all code snippets in Spark 3.4 and below by using the proper class selector in the JQuery. Previously the selector was a string .nav-link tab_python which did not comply multiple class selection: https://www.w3.org/TR/CSS21/selector.html#class-html. I assume it worked as a legacy behaviour somewhere. Now it uses the standard way .nav-link.tab_python.

Note that #42657 works because there's only single class assigned (after we refactored the site at #40269)

Why are the changes needed?

This is a regression in our documentation site.

Does this PR introduce any user-facing change?

Yes, once you click the language tab, it will apply to the examples in the whole page.

How was this patch tested?

Manually tested after building the site.

Screenshot 2023-09-19 at 12 08 17 PM

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the DOCS label Sep 19, 2023
@HyukjinKwon
Copy link
Member Author

HyukjinKwon added a commit that referenced this pull request Sep 19, 2023
…r all code snippets (Spark 3.4 and below)

### What changes were proposed in this pull request?

This PR proposes to recover the availity of switching languages consistently across docs for all code snippets in Spark 3.4 and below by using the proper class selector in the JQuery. Previously the selector was a string `.nav-link tab_python` which did not comply multiple class selection: https://www.w3.org/TR/CSS21/selector.html#class-html. I assume it worked as a legacy behaviour somewhere. Now it uses the standard way `.nav-link.tab_python`.

Note that #42657 works because there's only single class assigned (after we refactored the site at #40269)

### Why are the changes needed?

This is a regression in our documentation site.

### Does this PR introduce _any_ user-facing change?

Yes, once you click the language tab, it will apply to the examples in the whole page.

### How was this patch tested?

Manually tested after building the site.

![Screenshot 2023-09-19 at 12 08 17 PM](https://github.com/apache/spark/assets/6477701/09d0c117-9774-4404-8e2e-d454b7f700a3)

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #42989 from HyukjinKwon/SPARK-45210.

Authored-by: Hyukjin Kwon <gurwls223@apache.org>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit 796d878)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
HyukjinKwon added a commit that referenced this pull request Sep 19, 2023
…r all code snippets (Spark 3.4 and below)

### What changes were proposed in this pull request?

This PR proposes to recover the availity of switching languages consistently across docs for all code snippets in Spark 3.4 and below by using the proper class selector in the JQuery. Previously the selector was a string `.nav-link tab_python` which did not comply multiple class selection: https://www.w3.org/TR/CSS21/selector.html#class-html. I assume it worked as a legacy behaviour somewhere. Now it uses the standard way `.nav-link.tab_python`.

Note that #42657 works because there's only single class assigned (after we refactored the site at #40269)

### Why are the changes needed?

This is a regression in our documentation site.

### Does this PR introduce _any_ user-facing change?

Yes, once you click the language tab, it will apply to the examples in the whole page.

### How was this patch tested?

Manually tested after building the site.

![Screenshot 2023-09-19 at 12 08 17 PM](https://github.com/apache/spark/assets/6477701/09d0c117-9774-4404-8e2e-d454b7f700a3)

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #42989 from HyukjinKwon/SPARK-45210.

Authored-by: Hyukjin Kwon <gurwls223@apache.org>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
HyukjinKwon added a commit that referenced this pull request Sep 19, 2023
…r all code snippets (Spark 3.4 and below)

### What changes were proposed in this pull request?

This PR proposes to recover the availity of switching languages consistently across docs for all code snippets in Spark 3.4 and below by using the proper class selector in the JQuery. Previously the selector was a string `.nav-link tab_python` which did not comply multiple class selection: https://www.w3.org/TR/CSS21/selector.html#class-html. I assume it worked as a legacy behaviour somewhere. Now it uses the standard way `.nav-link.tab_python`.

Note that #42657 works because there's only single class assigned (after we refactored the site at #40269)

### Why are the changes needed?

This is a regression in our documentation site.

### Does this PR introduce _any_ user-facing change?

Yes, once you click the language tab, it will apply to the examples in the whole page.

### How was this patch tested?

Manually tested after building the site.

![Screenshot 2023-09-19 at 12 08 17 PM](https://github.com/apache/spark/assets/6477701/09d0c117-9774-4404-8e2e-d454b7f700a3)

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #42989 from HyukjinKwon/SPARK-45210.

Authored-by: Hyukjin Kwon <gurwls223@apache.org>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit 796d878)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
@HyukjinKwon
Copy link
Member Author

Merged to branch-3.4, branch-3.3, branch-3.2, and branch-3.1.

HyukjinKwon added a commit that referenced this pull request Sep 19, 2023
…r all code snippets (Spark 3.4 and below)

### What changes were proposed in this pull request?

This PR proposes to recover the availity of switching languages consistently across docs for all code snippets in Spark 3.4 and below by using the proper class selector in the JQuery. Previously the selector was a string `.nav-link tab_python` which did not comply multiple class selection: https://www.w3.org/TR/CSS21/selector.html#class-html. I assume it worked as a legacy behaviour somewhere. Now it uses the standard way `.nav-link.tab_python`.

Note that #42657 works because there's only single class assigned (after we refactored the site at #40269)

### Why are the changes needed?

This is a regression in our documentation site.

### Does this PR introduce _any_ user-facing change?

Yes, once you click the language tab, it will apply to the examples in the whole page.

### How was this patch tested?

Manually tested after building the site.

![Screenshot 2023-09-19 at 12 08 17 PM](https://github.com/apache/spark/assets/6477701/09d0c117-9774-4404-8e2e-d454b7f700a3)

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #42989 from HyukjinKwon/SPARK-45210.

Authored-by: Hyukjin Kwon <gurwls223@apache.org>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit 796d878)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
@panbingkun
Copy link
Contributor

late LGTM. 

Copy link
Contributor

@allisonwang-db allisonwang-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thanks @HyukjinKwon!

@sarutak
Copy link
Member

sarutak commented Sep 19, 2023

Late LGTM. Thanks!

Copy link
Contributor

@beliefer beliefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Late LGTM. This improvement make users have consistent view and reduce the misunderstanding.

viirya pushed a commit to viirya/spark-1 that referenced this pull request Oct 19, 2023
…r all code snippets (Spark 3.4 and below)

### What changes were proposed in this pull request?

This PR proposes to recover the availity of switching languages consistently across docs for all code snippets in Spark 3.4 and below by using the proper class selector in the JQuery. Previously the selector was a string `.nav-link tab_python` which did not comply multiple class selection: https://www.w3.org/TR/CSS21/selector.html#class-html. I assume it worked as a legacy behaviour somewhere. Now it uses the standard way `.nav-link.tab_python`.

Note that apache#42657 works because there's only single class assigned (after we refactored the site at apache#40269)

### Why are the changes needed?

This is a regression in our documentation site.

### Does this PR introduce _any_ user-facing change?

Yes, once you click the language tab, it will apply to the examples in the whole page.

### How was this patch tested?

Manually tested after building the site.

![Screenshot 2023-09-19 at 12 08 17 PM](https://github.com/apache/spark/assets/6477701/09d0c117-9774-4404-8e2e-d454b7f700a3)

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes apache#42989 from HyukjinKwon/SPARK-45210.

Authored-by: Hyukjin Kwon <gurwls223@apache.org>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
@HyukjinKwon HyukjinKwon deleted the SPARK-45210 branch January 15, 2024 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants