Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Bootstrap v. 3.3.7 [ref #4219] #4806

Merged
merged 3 commits into from
Jul 16, 2018
Merged

Conversation

mheppler
Copy link
Contributor

@mheppler mheppler commented Jul 3, 2018

Related Issues

Pull Request Checklist

… Also upgrade local version for the guides. [ref #4219]
@coveralls
Copy link

coveralls commented Jul 3, 2018

Coverage Status

Coverage increased (+0.002%) to 15.493% when pulling afde997 on 4219-bootstrap-upgrade into b2fe2e0 on develop.

@@ -23,8 +23,8 @@
</f:facet>
<link type="image/png" rel="icon" href="#{resource['images/favicondataverse.png']}" />
<link type="image/png" rel="image_src" href="#{resource['images/dataverseproject.png']}" />
<link type="text/css" rel="stylesheet" href="#{resource['bs/css/bootstrap.min.css']}?version=#{systemConfig.getVersion()}" />
<link type="text/css" rel="stylesheet" href="#{resource['bs/css/bootstrap-theme.min.css']}?version=#{systemConfig.getVersion()}" />
<link type="text/css" rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Summarizing some discussion w\ @mheppler and @kcondon Tue, using an external CDN brings up policy and technical questions.

Technical:

  • Should the CDN be user-configurable without forking?
  • Should there be a fallback / failover to a local copy if the CDN is down (aka - this is introducing a dependency on an additional external service)?
  • Resource integrity was discussed (aka - knowing the CDN is providing the expected resource without modification); @mheppler already solved this with the integrity attribute.
  • Performance implications were also discussed (without measuring, my intuition is that there would be minimal improvement from this change); but performance improvements were explicitly out of scope for this issue.

Policy:

  • Use of an external CDN means that Dataverse users are potentially leaking information to the CDN (IP addresses at least, potentially other browser-specific information). More privacy concious users are more likely to be impacted (eg - private browsing session / incognito window starting with an empty cache, or users manually clearing their cache).

Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like a good thing to make configurable especially if easy. It would allow installations to choose CDN's near their likely consumers for a small perf increase.

Copy link
Member

Choose a reason for hiding this comment

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

Meh. It's more likely that someone's Dataverse installation will be down that one of these popular CDNs. @pameyer are you concerned enough about privacy that you wouldn't want to run this code? If you're fine with it, let's let someone else come along and say no to CDNs. I'm excited about the performance boost.

Copy link
Contributor

Choose a reason for hiding this comment

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

The other thing is that if you were worried about the privacy, an installation could theoretically mock its own cdn or something.

Copy link
Contributor

Choose a reason for hiding this comment

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

@pdurbin If I measure and it doesn't show significant (aka - order of magnitude) performance improvements from the CDN, I'd definitely roll the non-CDN resources into our fork.

Whether or not that's me being too concerned about user privacy or not is a different question.

@oscardssmith mocking the CDN would require forking the code (DNS resolution would be happening on the end user / browser side).

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we want to support using different CDN's without forking? this seems important for non US installations, and it would be a silly reason for people to fork.

Copy link
Member

Choose a reason for hiding this comment

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

@pameyer ok. This reminds me of the conversation I was having with the Google Fonts guy. I was asking if it's possible to host the fonts yourself rather than getting them from a CDN and he kind of looked at me like I had three heads. For me it's about control more than privacy, I guess, but it's good to consider various angles.

@oscardssmith yeah. In case you weren't already aware, @pameyer (and many other people) already run a fork: #4784 (comment)

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

Approved. I'm excited about using CDNs for better performance.

@@ -23,8 +23,8 @@
</f:facet>
<link type="image/png" rel="icon" href="#{resource['images/favicondataverse.png']}" />
<link type="image/png" rel="image_src" href="#{resource['images/dataverseproject.png']}" />
<link type="text/css" rel="stylesheet" href="#{resource['bs/css/bootstrap.min.css']}?version=#{systemConfig.getVersion()}" />
<link type="text/css" rel="stylesheet" href="#{resource['bs/css/bootstrap-theme.min.css']}?version=#{systemConfig.getVersion()}" />
<link type="text/css" rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"/>
Copy link
Member

Choose a reason for hiding this comment

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

Meh. It's more likely that someone's Dataverse installation will be down that one of these popular CDNs. @pameyer are you concerned enough about privacy that you wouldn't want to run this code? If you're fine with it, let's let someone else come along and say no to CDNs. I'm excited about the performance boost.

…local files for 3.3.7 upgrade. Also updated iframe template. [ref #4219]
Copy link
Contributor

@matthew-a-dunlap matthew-a-dunlap left a comment

Choose a reason for hiding this comment

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

Seems straightforward, almost all the changes are just updating bootstrap files.

@kcondon kcondon merged commit 4073e2e into develop Jul 16, 2018
@kcondon kcondon deleted the 4219-bootstrap-upgrade branch July 16, 2018 21:39
@pdurbin pdurbin added this to the 4.9.2 - Stata Upgrades, etc. milestone Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants