Skip to content

[SPARK-30654] Bootstrap4 docs upgrade#27369

Closed
clarkead wants to merge 12 commits intoapache:masterfrom
clarkead:bootstrap4-docs-upgrade
Closed

[SPARK-30654] Bootstrap4 docs upgrade#27369
clarkead wants to merge 12 commits intoapache:masterfrom
clarkead:bootstrap4-docs-upgrade

Conversation

@clarkead
Copy link
Contributor

What changes were proposed in this pull request?

We are using an older version of Bootstrap (v. 2.1.0) for the online documentation site. Bootstrap 2.x was moved to EOL in Aug 2013 and Bootstrap 3.x was moved to EOL in July 2019 (https://github.com/twbs/release). Older versions of Bootstrap are also getting flagged in security scans for various CVEs:

https://snyk.io/vuln/SNYK-JS-BOOTSTRAP-72889
https://snyk.io/vuln/SNYK-JS-BOOTSTRAP-173700
https://snyk.io/vuln/npm:bootstrap:20180529
https://snyk.io/vuln/npm:bootstrap:20160627

I haven't validated each CVE, but it would probably be good practice to resolve any potential issues and get on a supported release.

The bad news is that there have been quite a few changes between Bootstrap 2 and Bootstrap 4. I've tried updating the library, refactoring/tweaking the CSS and JS to maintain a similar appearance and functionality, and testing the documentation. This is a fairly large change so I'm sure additional testing and fixes will be needed.

How was this patch tested?

This has been manually tested, but as there is a lot of documentation it is possible issues were missed. Additional testing and feedback is welcomed. If it appears a whole section was missed let me know and I'll take a pass at addressing that section.

@srowen
Copy link
Member

srowen commented Jan 28, 2020

Jenkins test this please

@SparkQA
Copy link

SparkQA commented Jan 28, 2020

Test build #117486 has finished for PR 27369 at commit 7083b5f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • public final class ColumnDictionary implements Dictionary

@srowen
Copy link
Member

srowen commented Apr 25, 2020

I haven't forgotten about this, just maybe waiting to merge big changes in master until after 3.0

@github-actions
Copy link

github-actions bot commented Aug 4, 2020

We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!

@github-actions github-actions bot added the Stale label Aug 4, 2020
@clarkead
Copy link
Contributor Author

clarkead commented Aug 4, 2020

@srowen are you able to remove the stale tag to prevent this from being automatically closed until you have a chance to review the commit post Spark 3.0 release work?

@srowen srowen removed the Stale label Aug 4, 2020
@srowen
Copy link
Member

srowen commented Aug 4, 2020

Looks pretty reasonable to go for at this point. Still up to date and worth me checking the docs build now?

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

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

Looks good! I built the docs and all looks OK. Just one minor question.

<link rel="stylesheet" href="css/bootstrap.min.css">
<style>
body {
{% if page.url contains "/ml" or page.url contains "/sql" or page.url contains "migration-guide.html" %}
Copy link
Member

Choose a reason for hiding this comment

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

I built the docs to take a look, and wondered, why special case these? the /ml and /sql pages look like they have too little padding at the top.

Copy link
Member

Choose a reason for hiding this comment

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

@clarkead I'd even merge this as-is but wondering if the above change is necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for reviewing this. I believe it was trying to address an issue with the left nav on those pages, but I don't remember the specifics. I do see the spacing difference though and I agree we should try to fix it. There should be a way to do this without making an exception as this does. Thank you for calling it out. I appreciate the feedback.

In reviewing this I think I might have noticed a display bug on the rdd-programming-guide.html and structured-streaming-programming-guide.html pages when viewed in a mobile device's browser.

Let me take a look at both issues and fix them. I'll try to submit another update before the end of this week.

Copy link
Member

Choose a reason for hiding this comment

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

It looked OK to me otherwise. Maybe it is just a matter of removing the special-casing here.

Copy link
Member

Choose a reason for hiding this comment

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

@clarkead I think it's sufficient (for now) to just remove the special casing code here. It seemed like it was causing the differences, itself, unless I really misunderstand its other effects - does something else go wrong if you don't special case? it seems to raise the title too far, and that's all I'd expect, so removing it would fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@srowen Sorry about the delay getting an updated PR. I've pushed two small tweaks to address the items in this thread. The first is to try and fix the formatting on those pages with left navigation that had special logic. I've removed the logic and fixed the width on the expand/collapse trigger.

The second change is with regards to the issue I saw on the rdd-programming-guide.html and streaming-programming-guide.html pages. It ended up being an issue where older versions of Bootstrap where setting the max-width on images to 100%, but Bootstrap4 removed that. As a result larger image files were blowing out the right side. I've added a css style to re-add this in main.css.

Copy link
Member

@viirya viirya left a comment

Choose a reason for hiding this comment

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

Thanks for working on this. I don't look at the details, but am wondering the file size change, e.g., bootstrap.css was removed (5624 lines), but boostrap.min.css only changed few lines. Is it because we don't use bootstrap.css at all previously and we only need boostrap.min.css?

@srowen
Copy link
Member

srowen commented Aug 13, 2020

The minified version is indeed smaller (good, we should have done that already). The line count is misleading though as the minified version also omits almost all line breaks. They are very long lines :)

@srowen
Copy link
Member

srowen commented Aug 26, 2020

Jenkins test this please

@srowen
Copy link
Member

srowen commented Aug 26, 2020

Looks good to me pending tests. Here's a screen shot of the new main docs page, for example, which shows it's fine and almost identical except for slightly different fonts (looks nicer IMHO).

Screen Shot 2020-08-26 at 14 56 38

@SparkQA
Copy link

SparkQA commented Aug 26, 2020

Test build #127938 has finished for PR 27369 at commit 0281f6c.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen srowen closed this in ed51a7f Aug 27, 2020
@srowen
Copy link
Member

srowen commented Aug 27, 2020

Merged to master

@clarkead
Copy link
Contributor Author

@srowen Thank you for your patience and help getting this merged

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.

5 participants