From ff3e9ddc57f96d3646c3aa2a644e0940e89ef98a Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Wed, 17 Jun 2026 18:55:37 -0600 Subject: [PATCH 1/6] fix: Remove mistakenly added import --- src/plots/plots.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plots/plots.js b/src/plots/plots.js index e255c5017b1..084e527998a 100644 --- a/src/plots/plots.js +++ b/src/plots/plots.js @@ -37,7 +37,6 @@ plots.fontAttrs = require('./font_attributes'); plots.layoutAttributes = require('./layout_attributes'); var commandModule = require('./command'); -const { server } = require('karma'); plots.executeAPICommand = commandModule.executeAPICommand; plots.computeAPICommandBindings = commandModule.computeAPICommandBindings; plots.manageCommandObserver = commandModule.manageCommandObserver; From ad776f0043d0c4f28ee172b1e88a012fd46732b3 Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Thu, 18 Jun 2026 08:11:23 -0600 Subject: [PATCH 2/6] Add missing draftlog for #7802 --- draftlogs/7802_change.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 draftlogs/7802_change.md diff --git a/draftlogs/7802_change.md b/draftlogs/7802_change.md new file mode 100644 index 00000000000..60c4b5bcf01 --- /dev/null +++ b/draftlogs/7802_change.md @@ -0,0 +1,2 @@ +- Update `sendDataToCloud` modebar button to upload chart to Plotly Cloud + - NOTE: The Plotly Cloud endpoint for receiving charts is not yet functional, so this button won't complete the upload. From feedf6e61afbcedbc5d3dbb1ef9db1ec80c6f0ed Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Thu, 18 Jun 2026 08:14:50 -0600 Subject: [PATCH 3/6] Update draftlog --- draftlogs/7802_change.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draftlogs/7802_change.md b/draftlogs/7802_change.md index 60c4b5bcf01..0cc7afe62cd 100644 --- a/draftlogs/7802_change.md +++ b/draftlogs/7802_change.md @@ -1,2 +1,2 @@ -- Update `sendDataToCloud` modebar button to upload chart to Plotly Cloud +- Update `sendDataToCloud` modebar button to upload chart to Plotly Cloud [[#7802](https://github.com/plotly/plotly.js/pull/7802)] - NOTE: The Plotly Cloud endpoint for receiving charts is not yet functional, so this button won't complete the upload. From 8d7324d4c73b8c405cd2241dd802331962bbfd68 Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Thu, 18 Jun 2026 08:17:15 -0600 Subject: [PATCH 4/6] Add new line to end of schema --- test/plot-schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/plot-schema.json b/test/plot-schema.json index a8df219d1d7..290851beb69 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -98663,4 +98663,4 @@ "type": "waterfall" } } -} +} \ No newline at end of file From 74f178a1c950ef6a04d66cd5224f87ac0db34ccb Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Thu, 18 Jun 2026 09:43:04 -0600 Subject: [PATCH 5/6] Update tests per new Cloud Upload feature --- test/jasmine/tests/config_test.js | 84 +++++++++++-------------------- 1 file changed, 28 insertions(+), 56 deletions(-) diff --git a/test/jasmine/tests/config_test.js b/test/jasmine/tests/config_test.js index 1b642a80d43..edf86e23f38 100644 --- a/test/jasmine/tests/config_test.js +++ b/test/jasmine/tests/config_test.js @@ -520,73 +520,45 @@ describe('config argument', function() { }); describe('plotlyServerURL:', function() { - var gd; - var form; - - beforeEach(function() { - gd = createGraphDiv(); - spyOn(HTMLFormElement.prototype, 'submit').and.callFake(function() { - form = this; - }); - }); + let gd; + beforeEach(() => { gd = createGraphDiv(); }); afterEach(destroyGraphDiv); - it('should not default to an external plotly cloud', function(done) { - Plotly.newPlot(gd, [], {}) - .then(function() { - expect(gd._context.plotlyServerURL).not.toBe('https://plot.ly'); - expect(gd._context.plotlyServerURL).not.toBe('https://chart-studio.plotly.com'); - expect(gd._context.plotlyServerURL).toBe(''); - - Plotly.Plots.sendDataToCloud(gd); - expect(form).toBe(undefined); - }) - .then(done, done.fail); + it('should default to an empty string', async() => { + await Plotly.newPlot(gd, [], {}); + expect(gd._context.plotlyServerURL).toBe(''); }); - it('should be able to connect to Chart Studio Cloud when set to https://chart-studio.plotly.com', function(done) { - Plotly.newPlot(gd, [], {}, { - plotlyServerURL: 'https://chart-studio.plotly.com' - }) - .then(function() { - expect(gd._context.plotlyServerURL).toBe('https://chart-studio.plotly.com'); - - Plotly.Plots.sendDataToCloud(gd); - expect(form.action).toBe('https://chart-studio.plotly.com/external'); - expect(form.method).toBe('post'); - }) - .then(done, done.fail); + it('can be configured via the config argument', async() => { + await Plotly.newPlot(gd, [], {}, { plotlyServerURL: 'https://cloud.plotly.com' }); + expect(gd._context.plotlyServerURL).toBe('https://cloud.plotly.com'); }); + }); - it('can be set to other base urls', function(done) { - Plotly.newPlot(gd, [], {}, {plotlyServerURL: 'dummy'}) - .then(function() { - expect(gd._context.plotlyServerURL).toBe('dummy'); + describe('Plotly.Plots.sendDataToCloud', function() { + let gd; + let openSpy; - Plotly.Plots.sendDataToCloud(gd); - expect(form.action).toContain('/dummy/external'); - expect(form.method).toBe('post'); - }) - .then(done, done.fail); + beforeEach(() => { + gd = createGraphDiv(); + openSpy = spyOn(window, 'open').and.returnValue({ postMessage: () => {} }); }); + afterEach(destroyGraphDiv); - it('has lesser priotiy then window env', function(done) { - window.PLOTLYENV = {BASE_URL: 'yo'}; - - Plotly.newPlot(gd, [], {}, {plotlyServerURL: 'dummy'}) - .then(function() { - expect(gd._context.plotlyServerURL).toBe('dummy'); + it('opens the given serverURL in a new tab', async() => { + await Plotly.newPlot(gd, [], {}); + Plotly.Plots.sendDataToCloud(gd, 'https://cloud.plotly.com'); + expect(openSpy).toHaveBeenCalledWith('https://cloud.plotly.com', '_blank'); + }); - Plotly.Plots.sendDataToCloud(gd); - expect(form.action).toContain('/yo/external'); - expect(form.method).toBe('post'); - }) - .catch(failTest) - .then(function() { - delete window.PLOTLY_ENV; - done(); - }); + it('emits plotly_exportfail when the popup is blocked', async() => { + openSpy.and.returnValue(null); + let failed = false; + await Plotly.newPlot(gd, [], {}); + gd.on('plotly_exportfail', () => { failed = true; }); + Plotly.Plots.sendDataToCloud(gd, 'https://cloud.plotly.com'); + expect(failed).toBe(true); }); }); From b16fc26ea5b3c0c90d5ede2d4bfda86e4cd5f4b1 Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Thu, 18 Jun 2026 10:33:08 -0600 Subject: [PATCH 6/6] Revert "Update tests per new Cloud Upload feature" This reverts commit 74f178a1c950ef6a04d66cd5224f87ac0db34ccb. --- test/jasmine/tests/config_test.js | 84 ++++++++++++++++++++----------- 1 file changed, 56 insertions(+), 28 deletions(-) diff --git a/test/jasmine/tests/config_test.js b/test/jasmine/tests/config_test.js index edf86e23f38..1b642a80d43 100644 --- a/test/jasmine/tests/config_test.js +++ b/test/jasmine/tests/config_test.js @@ -520,45 +520,73 @@ describe('config argument', function() { }); describe('plotlyServerURL:', function() { - let gd; + var gd; + var form; + + beforeEach(function() { + gd = createGraphDiv(); + spyOn(HTMLFormElement.prototype, 'submit').and.callFake(function() { + form = this; + }); + }); - beforeEach(() => { gd = createGraphDiv(); }); afterEach(destroyGraphDiv); - it('should default to an empty string', async() => { - await Plotly.newPlot(gd, [], {}); - expect(gd._context.plotlyServerURL).toBe(''); - }); + it('should not default to an external plotly cloud', function(done) { + Plotly.newPlot(gd, [], {}) + .then(function() { + expect(gd._context.plotlyServerURL).not.toBe('https://plot.ly'); + expect(gd._context.plotlyServerURL).not.toBe('https://chart-studio.plotly.com'); + expect(gd._context.plotlyServerURL).toBe(''); - it('can be configured via the config argument', async() => { - await Plotly.newPlot(gd, [], {}, { plotlyServerURL: 'https://cloud.plotly.com' }); - expect(gd._context.plotlyServerURL).toBe('https://cloud.plotly.com'); + Plotly.Plots.sendDataToCloud(gd); + expect(form).toBe(undefined); + }) + .then(done, done.fail); }); - }); - describe('Plotly.Plots.sendDataToCloud', function() { - let gd; - let openSpy; + it('should be able to connect to Chart Studio Cloud when set to https://chart-studio.plotly.com', function(done) { + Plotly.newPlot(gd, [], {}, { + plotlyServerURL: 'https://chart-studio.plotly.com' + }) + .then(function() { + expect(gd._context.plotlyServerURL).toBe('https://chart-studio.plotly.com'); - beforeEach(() => { - gd = createGraphDiv(); - openSpy = spyOn(window, 'open').and.returnValue({ postMessage: () => {} }); + Plotly.Plots.sendDataToCloud(gd); + expect(form.action).toBe('https://chart-studio.plotly.com/external'); + expect(form.method).toBe('post'); + }) + .then(done, done.fail); }); - afterEach(destroyGraphDiv); - it('opens the given serverURL in a new tab', async() => { - await Plotly.newPlot(gd, [], {}); - Plotly.Plots.sendDataToCloud(gd, 'https://cloud.plotly.com'); - expect(openSpy).toHaveBeenCalledWith('https://cloud.plotly.com', '_blank'); + it('can be set to other base urls', function(done) { + Plotly.newPlot(gd, [], {}, {plotlyServerURL: 'dummy'}) + .then(function() { + expect(gd._context.plotlyServerURL).toBe('dummy'); + + Plotly.Plots.sendDataToCloud(gd); + expect(form.action).toContain('/dummy/external'); + expect(form.method).toBe('post'); + }) + .then(done, done.fail); }); - it('emits plotly_exportfail when the popup is blocked', async() => { - openSpy.and.returnValue(null); - let failed = false; - await Plotly.newPlot(gd, [], {}); - gd.on('plotly_exportfail', () => { failed = true; }); - Plotly.Plots.sendDataToCloud(gd, 'https://cloud.plotly.com'); - expect(failed).toBe(true); + it('has lesser priotiy then window env', function(done) { + window.PLOTLYENV = {BASE_URL: 'yo'}; + + Plotly.newPlot(gd, [], {}, {plotlyServerURL: 'dummy'}) + .then(function() { + expect(gd._context.plotlyServerURL).toBe('dummy'); + + Plotly.Plots.sendDataToCloud(gd); + expect(form.action).toContain('/yo/external'); + expect(form.method).toBe('post'); + }) + .catch(failTest) + .then(function() { + delete window.PLOTLY_ENV; + done(); + }); }); });