From fed88fdafe2ee77a9d0a251f8fd42d64b4eb483d Mon Sep 17 00:00:00 2001 From: James Hadfield Date: Thu, 15 Mar 2018 08:51:43 -0700 Subject: [PATCH 1/6] es6-object-assign polyfill --- package.json | 1 + src/components/app.js | 1 - src/index.js | 7 +++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0ec342160..60674fbb8 100644 --- a/package.json +++ b/package.json @@ -115,6 +115,7 @@ "d3-time-format": "^2.0.5", "d3-timer": "^1.0.7", "d3-zoom": "^1.1.3", + "es6-object-assign": "^1.1.0", "express": "^4.13.3", "express-static-gzip": "^0.2.2", "leaflet": "^1.2.0", diff --git a/src/components/app.js b/src/components/app.js index da2f23fff..613ed1b81 100644 --- a/src/components/app.js +++ b/src/components/app.js @@ -1,7 +1,6 @@ import React from "react"; import PropTypes from 'prop-types'; import { connect } from "react-redux"; -import "whatwg-fetch"; // setup polyfill import { loadJSONs } from "../actions/loadData"; import ToggleSidebarTab from "./framework/toggle-sidebar-tab"; import Controls from "./controls/controls"; diff --git a/src/index.js b/src/index.js index 5179fcb89..2fb498fd6 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,9 @@ +/* eslint-disable import/first */ +/* P O L Y F I L L S */ +// require('es6-object-assign').polyfill(); // eslint-disable-line +require('es6-object-assign/auto'); +import "whatwg-fetch"; +/* L I B R A R I E S */ import React from "react"; import ReactDOM from "react-dom"; import ReactGA from "react-ga"; @@ -8,6 +14,7 @@ import Monitor from "./components/framework/monitor"; import PageSelect from "./components/framework/pageSelect"; import Notifications from "./components/notifications/notifications"; import configureStore from "./store"; +/* S T Y L E S H E E T S */ import "./css/global.css"; import "./css/browserCompatability.css"; import "./css/bootstrapCustomized.css"; From 484ce01410bcf9f320e99008e2f614cf8da3bb8b Mon Sep 17 00:00:00 2001 From: James Hadfield Date: Thu, 15 Mar 2018 09:00:47 -0700 Subject: [PATCH 2/6] String.startsWith polyfill. Splash page now loads. --- src/index.js | 4 ++-- src/util/polyfills.js | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 src/util/polyfills.js diff --git a/src/index.js b/src/index.js index 2fb498fd6..75f2119b0 100644 --- a/src/index.js +++ b/src/index.js @@ -1,8 +1,8 @@ /* eslint-disable import/first */ /* P O L Y F I L L S */ -// require('es6-object-assign').polyfill(); // eslint-disable-line -require('es6-object-assign/auto'); +require('es6-object-assign/auto'); // eslint-disable-line import "whatwg-fetch"; +import "./util/polyfills"; /* L I B R A R I E S */ import React from "react"; import ReactDOM from "react-dom"; diff --git a/src/util/polyfills.js b/src/util/polyfills.js new file mode 100644 index 000000000..76522c99e --- /dev/null +++ b/src/util/polyfills.js @@ -0,0 +1,8 @@ +/* eslint-disable */ + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith#Polyfill +if (!String.prototype.startsWith) { + String.prototype.startsWith = function(search, pos) { + return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; + }; +} From c8f998dae68876bebafcc93ec7f769908c795a1a Mon Sep 17 00:00:00 2001 From: James Hadfield Date: Thu, 15 Mar 2018 09:20:22 -0700 Subject: [PATCH 3/6] remove autocomplete script from index.html --- index.html | 233 ----------------------------------------------------- 1 file changed, 233 deletions(-) diff --git a/index.html b/index.html index ab468d177..344f633c9 100644 --- a/index.html +++ b/index.html @@ -25,238 +25,5 @@ - From 0400831ba04a50fb9bade17c4f11e26c421eca40 Mon Sep 17 00:00:00 2001 From: James Hadfield Date: Thu, 15 Mar 2018 09:37:06 -0700 Subject: [PATCH 4/6] babel-polyfill --- package.json | 2 ++ src/index.js | 4 +--- src/util/polyfills.js | 8 ++++++++ webpack.config.dev.js | 1 + webpack.config.prod.js | 1 + 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 60674fbb8..540fe0380 100644 --- a/package.json +++ b/package.json @@ -99,6 +99,7 @@ }, "dependencies": { "awesomplete": "^1.1.2", + "babel-polyfill": "^6.26.0", "binomial": "^0.2.0", "color": "^0.7.3", "create-react-class": "^15.6.0", @@ -116,6 +117,7 @@ "d3-timer": "^1.0.7", "d3-zoom": "^1.1.3", "es6-object-assign": "^1.1.0", + "es6-promise-polyfill": "^1.2.0", "express": "^4.13.3", "express-static-gzip": "^0.2.2", "leaflet": "^1.2.0", diff --git a/src/index.js b/src/index.js index 75f2119b0..136add337 100644 --- a/src/index.js +++ b/src/index.js @@ -1,8 +1,6 @@ /* eslint-disable import/first */ /* P O L Y F I L L S */ -require('es6-object-assign/auto'); // eslint-disable-line -import "whatwg-fetch"; -import "./util/polyfills"; +import "./util/polyfills"; // eslint-disable-line /* L I B R A R I E S */ import React from "react"; import ReactDOM from "react-dom"; diff --git a/src/util/polyfills.js b/src/util/polyfills.js index 76522c99e..bdbccedbc 100644 --- a/src/util/polyfills.js +++ b/src/util/polyfills.js @@ -1,5 +1,13 @@ /* eslint-disable */ +import "babel-polyfill"; + +import "whatwg-fetch"; + +window.Promise = require('es6-promise-polyfill').Promise; + +require('es6-object-assign/auto'); + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith#Polyfill if (!String.prototype.startsWith) { String.prototype.startsWith = function(search, pos) { diff --git a/webpack.config.dev.js b/webpack.config.dev.js index a14be0b8b..134ec12df 100644 --- a/webpack.config.dev.js +++ b/webpack.config.dev.js @@ -4,6 +4,7 @@ const webpack = require('webpack'); module.exports = { devtool: 'eval-source-map', entry: [ + "babel-polyfill", 'react-hot-loader/patch', 'webpack-hot-middleware/client', './src/index' diff --git a/webpack.config.prod.js b/webpack.config.prod.js index e025e2252..989de8685 100644 --- a/webpack.config.prod.js +++ b/webpack.config.prod.js @@ -4,6 +4,7 @@ const CompressionPlugin = require('compression-webpack-plugin'); module.exports = { entry: [ + "babel-polyfill", "./src/index" ], output: { From cda08ed670980361cdb7dfa880b58e1ee785b8d7 Mon Sep 17 00:00:00 2001 From: James Hadfield Date: Fri, 16 Mar 2018 12:46:29 -0700 Subject: [PATCH 5/6] fix grid stacking on IE, windows/linux firefox --- src/util/computeResponsive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/computeResponsive.js b/src/util/computeResponsive.js index 128837f95..f6046dcbe 100644 --- a/src/util/computeResponsive.js +++ b/src/util/computeResponsive.js @@ -25,7 +25,7 @@ /* HARDCODED CONSTANTS */ const xPaddingOneCard = 34; // derived from empirical testing, depends on Card margins -const xPaddingTwoCards = 56; +const xPaddingTwoCards = 65; // 56 works fine on chrome, mac-firefox, but not on IE, linux/windows firefox. const verticalPadding = 52; export const calcUsableWidth = (availableWidth, fraction) => { From 66b9585f1af0b0bed89da10ece1857ec13422458 Mon Sep 17 00:00:00 2001 From: james hadfield Date: Fri, 16 Mar 2018 12:54:13 -0700 Subject: [PATCH 6/6] gisaid iframe --- scripts/gisaid_iframe.html | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 scripts/gisaid_iframe.html diff --git a/scripts/gisaid_iframe.html b/scripts/gisaid_iframe.html new file mode 100644 index 000000000..7d0e39860 --- /dev/null +++ b/scripts/gisaid_iframe.html @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + GISAID - Nextflu App + + + +
+ + + + + +