Skip to content

Conversation

@yaooqinn
Copy link
Member

@yaooqinn yaooqinn commented Dec 20, 2023

What changes were proposed in this pull request?

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 changes the HTML body overflow-x from hidden to auto to enable the underlying table to scroll horizontally.

Why are the changes needed?

Fix documentation

Does this PR introduce any user-facing change?

no

How was this patch tested?

Before

image

After

image

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

no

@yaooqinn
Copy link
Member Author

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?


### Related environment variables

<div class="table-wrapper">
Copy link
Contributor

Choose a reason for hiding this comment

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

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

width: 100%;
overflow-wrap: normal;
border-collapse: collapse; /* Ensures that the borders collapse into a single border */
word-break: normal;
Copy link
Contributor

Choose a reason for hiding this comment

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

If you add overflow-x: auto; here, does it solve the problem without needing all the new divs?

Copy link
Member Author

Choose a reason for hiding this comment

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

This makes sense to me, let me add it to somewhere else

@@ -1,7 +0,0 @@
/*!
Copy link
Contributor

Choose a reason for hiding this comment

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

Why delete these bootstrap files btw?

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 */
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Member Author

Choose a reason for hiding this comment

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

No.

@dongjoon-hyun
Copy link
Member

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.

@github-actions github-actions bot removed the SQL label Dec 21, 2023
@yaooqinn
Copy link
Member Author

yaooqinn commented Dec 21, 2023

I didn't try to fix the scrollbar issue because it's a global issue instead of this specific table.

@dongjoon-hyun, thanks for providing this information. So, changing the overflow-x of the body from hidden to auto can solve the problem globally.

@yaooqinn yaooqinn closed this in fc7d7bc Dec 22, 2023
yaooqinn added a commit that referenced this pull request Dec 22, 2023
### What changes were proposed in this pull request?

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 changes the HTML body overflow-x from hidden to auto to enable the underlying table to scroll horizontally.

### Why are the changes needed?

Fix documentation

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

no

### How was this patch tested?

#### Before
![image](https://github.com/apache/spark/assets/8326978/437bee91-ab0d-4616-aaaf-f99171dcf9f9)

#### After
![image](https://github.com/apache/spark/assets/8326978/327ed82b-3e14-4a27-be1a-835a7b21c000)

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

no

Closes #44423 from yaooqinn/SPARK-46464.

Authored-by: Kent Yao <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit fc7d7bc)
Signed-off-by: Kent Yao <[email protected]>
@yaooqinn
Copy link
Member Author

Thank you all, merged to master and 3.5

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.

4 participants