Skip to content

Conversation

@gengliangwang
Copy link
Member

@gengliangwang gengliangwang commented Nov 30, 2023

What changes were proposed in this pull request?

After #40269, there is no border in the generated tables of Spark doc(for example, https://spark.apache.org/docs/latest/sql-ref-ansi-compliance.html) . This PR is to fix it by restoring part of the table style in https://github.com/apache/spark/pull/40269/files#diff-309b964023ca899c9505205f36d3f4d5b36a6487e5c9b2e242204ee06bbc9ce9L26

This PR also unifies all the styles of tables by removing the class="table table-striped" in HTML style tables in markdown docs.

Why are the changes needed?

Fix a regression in the table CSS of Spark docs

Does this PR introduce any user-facing change?

No

How was this patch tested?

Manually build docs and verify.
Before changes:
image

After changes:
image

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

Generated-by: ChatGPT 4

@gengliangwang
Copy link
Member Author

cc @grundprinzip as well

@gengliangwang gengliangwang requested a review from srowen November 30, 2023 21:21
}

table th, table td {
border: 1px solid #cccccc; /* Adds a border to each table header and data cell */
Copy link
Member Author

Choose a reason for hiding this comment

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

I asked ChatGPT to recover the CSS with doc. It looks good so I keep it.

Copy link
Member Author

Choose a reason for hiding this comment

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

The result of the changes are done by myself.

Copy link
Contributor

Choose a reason for hiding this comment

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

why dropping the striped this is exactly what the bootstrap theme already provides us.

The easier way would be simply to

.table {
  border-collapse: collapse;
  border: 1px solid #ccc
}

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried the striped style but it was not very clear when there is long text ( you can find it in the commit history):
image

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM. Thank you, @gengliangwang .

@gengliangwang
Copy link
Member Author

gengliangwang commented Nov 30, 2023

Merging to master

@gengliangwang
Copy link
Member Author

Created backport for 3.5 in #44097

gengliangwang added a commit to apache/spark-website that referenced this pull request Nov 30, 2023
After apache/spark#40269, there is no border in the generated tables of Spark doc(for example,  [sql-ref-ansi-compliance.html](https://spark.apache.org/docs/latest/sql-ref-ansi-compliance.html)) . Currently only the doc of Spark 3.5.0 is affected. 
This PR is to apply the changes in apache/spark#44096 on the current Spark 3.5.0 doc by
1. change the `site/docs/3.5.0/css/custom.css` 
2. Execute `sed  -i ''  's/table class="table table-striped"/table/' *.html` under `site/docs/3.5.0/` directory.

This should be a safe change. I have verified it on my local env.
asl3 pushed a commit to asl3/spark that referenced this pull request Dec 5, 2023
### What changes were proposed in this pull request?

After apache#40269, there is no border in the generated tables of Spark doc(for example,  https://spark.apache.org/docs/latest/sql-ref-ansi-compliance.html) .  This PR is to fix it by restoring part of the table style in https://github.com/apache/spark/pull/40269/files#diff-309b964023ca899c9505205f36d3f4d5b36a6487e5c9b2e242204ee06bbc9ce9L26

This PR also unifies all the styles of tables by removing the `class="table table-striped"` in HTML style tables in markdown docs.

### Why are the changes needed?

Fix a regression in the table CSS of Spark docs

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

No

### How was this patch tested?

Manually build docs and verify.
Before changes:
<img width="931" alt="image" src="https://github.com/apache/spark/assets/1097932/1eb7abff-65af-4c4c-bbd5-9077f38c1b43">

After changes:
<img width="911" alt="image" src="https://github.com/apache/spark/assets/1097932/be77d4c6-1279-43ec-a234-b69ee02e3dc6">

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

Generated-by: ChatGPT 4

Closes apache#44096 from gengliangwang/fixTable.

Authored-by: Gengliang Wang <gengliang@apache.org>
Signed-off-by: Gengliang Wang <gengliang@apache.org>
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