From b18bf7295ad69f67d40d98a0dca83ad750ace39f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 30 Oct 2019 12:11:52 -0400 Subject: [PATCH 1/9] use node 12.13.0 (LTS) on CircleCI --- .circleci/config.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b72ab47f0b7..b34366a43ca 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ version: 2.0 jobs: build: docker: - - image: circleci/node:10.9.0 + - image: circleci/node:12.13.0 working_directory: ~/plotly.js steps: - checkout @@ -39,7 +39,7 @@ jobs: test-jasmine: docker: # need '-browsers' version to test in real (xvfb-wrapped) browsers - - image: circleci/node:10.9.0-browsers + - image: circleci/node:12.13.0-browsers parallelism: 2 working_directory: ~/plotly.js steps: @@ -52,7 +52,7 @@ jobs: test-jasmine2: docker: # need '-browsers' version to test in real (xvfb-wrapped) browsers - - image: circleci/node:10.9.0-browsers + - image: circleci/node:12.13.0-browsers parallelism: 3 working_directory: ~/plotly.js steps: @@ -65,7 +65,7 @@ jobs: test-jasmine3: docker: # need '-browsers' version to test in real (xvfb-wrapped) browsers - - image: circleci/node:10.9.0-browsers + - image: circleci/node:12.13.0-browsers working_directory: ~/plotly.js steps: - attach_workspace: @@ -115,7 +115,7 @@ jobs: test-syntax: docker: - - image: circleci/node:10.9.0 + - image: circleci/node:12.13.0 working_directory: ~/plotly.js steps: - attach_workspace: @@ -127,7 +127,7 @@ jobs: test-bundle: docker: # need '-browsers' version to test in real (xvfb-wrapped) browsers - - image: circleci/node:10.9.0-browsers + - image: circleci/node:12.13.0-browsers working_directory: ~/plotly.js steps: - attach_workspace: @@ -138,7 +138,7 @@ jobs: publish: docker: - - image: circleci/node:10.9.0 + - image: circleci/node:12.13.0 working_directory: ~/plotly.js steps: - attach_workspace: From dff2d0b00b8d796a0c37b768b2baecf72bbea0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 30 Oct 2019 12:12:06 -0400 Subject: [PATCH 2/9] use node "12" on AppVeyor --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 7db941a9b86..678fbd73145 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ environment: - nodejs_version: "10" + nodejs_version: "12" install: - ps: Install-Product node $env:nodejs_version From 39c194425ace6bf0555744d7ec6043731a08237a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 30 Oct 2019 15:15:08 -0400 Subject: [PATCH 3/9] update Contributing to mention node v12 --- CONTRIBUTING.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 54baa0130df..16973c49bba 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,12 +34,10 @@ We use the following [labels](https://github.com/plotly/plotly.js/labels) to tra #### Prerequisites - git -- [node.js](https://nodejs.org/en/). We recommend using node.js v10.x, but all - versions starting from v6 should work. Upgrading and managing node versions - can be easily done using [`nvm`](https://github.com/creationix/nvm) or its - Windows alternatives. -- [`npm`](https://www.npmjs.com/) v6.x and up (which ships by default with - node.js v10.x) to ensure that the +- [node.js](https://nodejs.org/en/). We recommend using node.js v12.x (LTS). + Upgrading and managing node versions can be easily done using + [`nvm`](https://github.com/creationix/nvm) or its Windows alternatives. +- [`npm`](https://www.npmjs.com/) v6.x and up to ensure that the [`package-lock.json`](https://docs.npmjs.com/files/package-lock.json) file is used and updated correctly. From a5eba617a552082a09048399a8a738d09003a6b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 30 Oct 2019 15:15:38 -0400 Subject: [PATCH 4/9] set --node 12.13 and --npm 6.12 in `check-node-version` call ... to make sure these version are used when making new releases --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7260dd4cc30..7cefe25a236 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "start-image_viewer": "node devtools/image_viewer/server.js", "start": "npm run start-test_dashboard", "baseline": "node tasks/baseline.js", - "preversion": "check-node-version --node 10 --npm 6 && npm-link-check && npm ls --prod", + "preversion": "check-node-version --node 12.13 --npm 6.12.0 && npm-link-check && npm ls --prod", "version": "npm run build && git add -A dist src build", "postversion": "node -e \"console.log('Version bumped and committed. If ok, run: git push && git push --tags')\"", "postpublish": "node tasks/sync_packages.js", From 7759c7602be9d0247176d817bddf6ac0f6b5e630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 20 Nov 2019 15:00:53 -0500 Subject: [PATCH 5/9] bump npm version check to `6.13` --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7cefe25a236..403f90d50e1 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "start-image_viewer": "node devtools/image_viewer/server.js", "start": "npm run start-test_dashboard", "baseline": "node tasks/baseline.js", - "preversion": "check-node-version --node 12.13 --npm 6.12.0 && npm-link-check && npm ls --prod", + "preversion": "check-node-version --node 12.13 --npm 6.13 && npm-link-check && npm ls --prod", "version": "npm run build && git add -A dist src build", "postversion": "node -e \"console.log('Version bumped and committed. If ok, run: git push && git push --tags')\"", "postpublish": "node tasks/sync_packages.js", From 97fe7600c9a110c5c38a7aa49c7d8612e3dda977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 20 Nov 2019 16:13:25 -0500 Subject: [PATCH 6/9] adapt "replot canvas" test for Chrome 78 --- test/jasmine/tests/splom_test.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/test/jasmine/tests/splom_test.js b/test/jasmine/tests/splom_test.js index 4bd01595055..c10b705b246 100644 --- a/test/jasmine/tests/splom_test.js +++ b/test/jasmine/tests/splom_test.js @@ -943,18 +943,24 @@ describe('Test splom interactions:', function() { .then(done); }); - it('@gl should clear graph and replot when canvas and WebGL context dimensions do not match', function(done) { + it('@noCI @gl should clear graph and replot when canvas and WebGL context dimensions do not match', function(done) { var fig = Lib.extendDeep({}, require('@mocks/splom_iris.json')); fig.layout.showlegend = false; function assertDims(msg, w, h) { var canvas = gd._fullLayout._glcanvas; - expect(canvas.node().width).toBe(w, msg); - expect(canvas.node().height).toBe(h, msg); + expect(canvas.node().width).toBe(w, msg + '| canvas width'); + expect(canvas.node().height).toBe(h, msg + '| canvas height'); var gl = canvas.data()[0].regl._gl; - expect(gl.drawingBufferWidth).toBe(w, msg); - expect(gl.drawingBufferHeight).toBe(h, msg); + if(/Chrome\/78/.test(window.navigator.userAgent)) { + // N.B. for some reason 4096 is the max dimension allowed by Chrome 78 + expect(gl.drawingBufferWidth).toBe(Math.min(w, 4096), msg + '| drawingBufferWidth'); + expect(gl.drawingBufferHeight).toBe(Math.min(h, 4096), msg + '| drawingBufferHeight'); + } else { + expect(gl.drawingBufferWidth).toBe(w, msg + '| drawingBufferWidth'); + expect(gl.drawingBufferHeight).toBe(h, msg + '| drawingBufferHeight'); + } } var methods = ['cleanPlot', 'supplyDefaults', 'doCalcdata']; From cb5be64e4ab290ce92272783676e152722c95f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 20 Nov 2019 16:42:18 -0500 Subject: [PATCH 7/9] add @flaky to editable:true colorbar tests --- test/jasmine/tests/colorbar_test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/jasmine/tests/colorbar_test.js b/test/jasmine/tests/colorbar_test.js index ac11638f43c..0405651fad9 100644 --- a/test/jasmine/tests/colorbar_test.js +++ b/test/jasmine/tests/colorbar_test.js @@ -397,7 +397,7 @@ describe('Test colorbar:', function() { return document.querySelector('.colorbar'); } - it('can drag root-level colorbars in editable mode', function(done) { + it('@flaky can drag root-level colorbars in editable mode', function(done) { Plotly.newPlot(gd, [{z: [[1, 2], [3, 4]], type: 'heatmap'}], {width: 400, height: 400}, @@ -417,7 +417,7 @@ describe('Test colorbar:', function() { .then(done); }); - it('can drag marker-level colorbars in editable mode', function(done) { + it('@flaky can drag marker-level colorbars in editable mode', function(done) { Plotly.newPlot(gd, [{y: [1, 2, 1], marker: {color: [0, 1, 2], showscale: true}}], {width: 400, height: 400}, @@ -437,7 +437,7 @@ describe('Test colorbar:', function() { .then(done); }); - it('can drag colorbars linked to color axes in editable mode', function(done) { + it('@flaky can drag colorbars linked to color axes in editable mode', function(done) { Plotly.newPlot(gd, [{z: [[1, 2], [3, 4]], type: 'heatmap', coloraxis: 'coloraxis'}], {coloraxis: {}, width: 400, height: 400}, From 9ec38b1548c76ae2c513b8fc814142ebf806d67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 20 Nov 2019 17:33:22 -0500 Subject: [PATCH 8/9] round bbox widths values to workaround Chrome78 rounding errors --- src/components/fx/hover.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/fx/hover.js b/src/components/fx/hover.js index 44f36d01393..85bff49168e 100644 --- a/src/components/fx/hover.js +++ b/src/components/fx/hover.js @@ -884,7 +884,7 @@ function createHoverText(hoverData, opts, gd) { .text(s.text()) .call(Drawing.font, commonLabelFont); var dummyBB = dummy.node().getBoundingClientRect(); - if(dummyBB.width < tbb.width) { + if(Math.round(dummyBB.width) < Math.round(tbb.width)) { s.attr('x', ltx - dummyBB.width); } dummy.remove(); From 00b7d309e26322320a13782095d06ec5d4801dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 20 Nov 2019 17:33:29 -0500 Subject: [PATCH 9/9] tweak hover label px position in scatterternay fill test --- test/jasmine/tests/hover_label_test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/jasmine/tests/hover_label_test.js b/test/jasmine/tests/hover_label_test.js index 5a284112464..0161aa703e2 100644 --- a/test/jasmine/tests/hover_label_test.js +++ b/test/jasmine/tests/hover_label_test.js @@ -2544,7 +2544,7 @@ describe('hover on fill', function() { assertLabelsCorrect([237, 170], [247.7, 166], 'trace 2'); // hover on the cartesian trace in the corner - assertLabelsCorrect([363, 122], [363, 122], 'trace 38'); + assertLabelsCorrect([363, 122], [367, 122], 'trace 38'); }) .catch(failTest) .then(done);