You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "yaooqinn (via GitHub)" <gi...@apache.org> on 2023/12/20 11:01:21 UTC

[PR] [SPARK-46464][DOC] Fix the scroll issue of tables when overflow [spark]

yaooqinn opened a new pull request, #44423:
URL: https://github.com/apache/spark/pull/44423

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   
   https://spark.apache.org/docs/3.4.1/running-on-kubernetes.html#spark-properties
   https://spark.apache.org/docs/latest/running-on-kubernetes.html#spark-properties
   
   As listed above, the doc content in 3.5.0 cannot scroll horizontally. Users can only see the rest of its content when a table overflows if they zoom out as much as possible, resulting in hard-to-read minor characters.
   
   
   This PR added a div with style='overflow-x: auto;' to enable the underlying table to scroll horizontally.
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   Fix documentation
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   
   no
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   
   
   https://github.com/apache/spark/assets/8326978/fb55f191-9dbe-46e5-ab83-9b56b9e0066f
   
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   <!--
   If generative AI tooling has been used in the process of authoring this patch, please include the
   phrase: 'Generated-by: ' followed by the name of the tool and its version.
   If no, write 'No'.
   Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
   -->
   
   no


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46464][DOC] Fix the scroll issue of tables when overflow [spark]

Posted by "yaooqinn (via GitHub)" <gi...@apache.org>.
yaooqinn commented on code in PR #44423:
URL: https://github.com/apache/spark/pull/44423#discussion_r1433370499


##########
docs/css/custom.css:
##########
@@ -1112,11 +1112,13 @@ table {
   width: 100%;
   overflow-wrap: normal;
   border-collapse: collapse; /* Ensures that the borders collapse into a single border */
+  word-break: normal;

Review Comment:
   This makes sense to me, let me add it to somewhere else



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46464][DOC] Fix the scroll issue of tables when overflow [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #44423:
URL: https://github.com/apache/spark/pull/44423#issuecomment-1865283255

   > cc @dongjoon-hyun. IIRC, you had submitted a pull request in the past to truncate Spark configuration keys on the Kubernetes documentation. Did we encounter the same issue?
   
   Yes, this is a mailing list reported issue. However, as you see in the mailing list, I didn't try to fix the scrollbar issue because it's a global issue instead of this specific table. I fixed only a specific table layout.
   
   - #43814


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46464][DOC] Fix the scroll issue of tables when overflow [spark]

Posted by "nchammas (via GitHub)" <gi...@apache.org>.
nchammas commented on code in PR #44423:
URL: https://github.com/apache/spark/pull/44423#discussion_r1432957322


##########
docs/css/bootstrap.min.css:
##########
@@ -1,7 +0,0 @@
-/*!

Review Comment:
   Why delete these bootstrap files btw?



##########
docs/css/custom.css:
##########
@@ -1112,11 +1112,13 @@ table {
   width: 100%;
   overflow-wrap: normal;
   border-collapse: collapse; /* Ensures that the borders collapse into a single border */
+  word-break: normal;
 }
 
 table th, table td {
   border: 1px solid #cccccc; /* Adds a border to each table header and data cell */
   padding: 6px 13px; /* Optional: Adds padding inside each cell for better readability */
+  max-width: 895px; /* Adjusted to `max-width(914px) of .content - padding` to avoid hidden content from a single cell */

Review Comment:
   Hmm, so without this some table cells hide their content?



##########
docs/css/custom.css:
##########
@@ -1112,11 +1112,13 @@ table {
   width: 100%;
   overflow-wrap: normal;
   border-collapse: collapse; /* Ensures that the borders collapse into a single border */
+  word-break: normal;

Review Comment:
   If you add `overflow-x: auto;` here, does it solve the problem without needing all the new `div`s?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46464][DOC] Fix the scroll issue of tables when overflow [spark]

Posted by "yaooqinn (via GitHub)" <gi...@apache.org>.
yaooqinn commented on PR #44423:
URL: https://github.com/apache/spark/pull/44423#issuecomment-1867197653

   Thank you all, merged to master and 3.5


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46464][DOC] Fix the scroll issue of tables when overflow [spark]

Posted by "yaooqinn (via GitHub)" <gi...@apache.org>.
yaooqinn commented on PR #44423:
URL: https://github.com/apache/spark/pull/44423#issuecomment-1864282118

   cc @dongjoon-hyun. IIRC, you had submitted a pull request in the past to truncate Spark configuration keys on the Kubernetes documentation. Did we encounter the same issue?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46464][DOC] Fix the scroll issue of tables when overflow [spark]

Posted by "yaooqinn (via GitHub)" <gi...@apache.org>.
yaooqinn commented on PR #44423:
URL: https://github.com/apache/spark/pull/44423#issuecomment-1865384369

   Simply changing the `overflow-x` of the `body` from `hidden` to `auto` can solve the problem


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46464][DOC] Fix the scroll issue of tables when overflow [spark]

Posted by "yaooqinn (via GitHub)" <gi...@apache.org>.
yaooqinn closed pull request #44423: [SPARK-46464][DOC] Fix the scroll issue of tables when overflow
URL: https://github.com/apache/spark/pull/44423


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46464][DOC] Fix the scroll issue of tables when overflow [spark]

Posted by "yaooqinn (via GitHub)" <gi...@apache.org>.
yaooqinn commented on code in PR #44423:
URL: https://github.com/apache/spark/pull/44423#discussion_r1433355647


##########
docs/building-spark.md:
##########
@@ -284,6 +284,7 @@ If use an individual repository or a repository on GitHub Enterprise, export bel
 
 ### Related environment variables
 
+<div class="table-wrapper">

Review Comment:
   https://github.com/gettalong/kramdown/issues/69



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46464][DOC] Fix the scroll issue of tables when overflow [spark]

Posted by "yaooqinn (via GitHub)" <gi...@apache.org>.
yaooqinn commented on code in PR #44423:
URL: https://github.com/apache/spark/pull/44423#discussion_r1433357518


##########
docs/css/custom.css:
##########
@@ -1112,11 +1112,13 @@ table {
   width: 100%;
   overflow-wrap: normal;
   border-collapse: collapse; /* Ensures that the borders collapse into a single border */
+  word-break: normal;
 }
 
 table th, table td {
   border: 1px solid #cccccc; /* Adds a border to each table header and data cell */
   padding: 6px 13px; /* Optional: Adds padding inside each cell for better readability */
+  max-width: 895px; /* Adjusted to `max-width(914px) of .content - padding` to avoid hidden content from a single cell */

Review Comment:
   No.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46464][DOC] Fix the scroll issue of tables when overflow [spark]

Posted by "nchammas (via GitHub)" <gi...@apache.org>.
nchammas commented on code in PR #44423:
URL: https://github.com/apache/spark/pull/44423#discussion_r1432942933


##########
docs/building-spark.md:
##########
@@ -284,6 +284,7 @@ If use an individual repository or a repository on GitHub Enterprise, export bel
 
 ### Related environment variables
 
+<div class="table-wrapper">

Review Comment:
   I'm not a CSS expert, but instead of adding a new `div` all over the place, couldn't we just add the appropriate styling in the main CSS file directly to all `table` elements?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org