Skip to content

Commit ec97a83

Browse files
committed
Merge remote-tracking branch 'origin/master' into pull-5849
2 parents 3e3ee1e + c5afe3c commit ec97a83

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1985
-17357
lines changed

.circleci/config.yml

+38
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,35 @@ jobs:
3131
paths:
3232
- plotly.js
3333

34+
timezone-jasmine:
35+
docker:
36+
# need '-browsers' version to test in real (xvfb-wrapped) browsers
37+
- image: circleci/node:12.22.1-browsers
38+
working_directory: ~/plotly.js
39+
steps:
40+
- attach_workspace:
41+
at: ~/
42+
- run:
43+
name: Run hover_label test in UTC timezone
44+
environment:
45+
TZ: "UTC"
46+
command: date && npm run test-jasmine hover_label
47+
- run:
48+
name: Run hover_label test in Europe/Berlin timezone
49+
environment:
50+
TZ: "Europe/Berlin"
51+
command: date && npm run test-jasmine hover_label
52+
- run:
53+
name: Run hover_label test in Asia/Tokyo timezone
54+
environment:
55+
TZ: "Asia/Tokyo"
56+
command: date && npm run test-jasmine hover_label
57+
- run:
58+
name: Run hover_label test in America/Toronto timezone
59+
environment:
60+
TZ: "America/Toronto"
61+
command: date && npm run test-jasmine hover_label
62+
3463
no-gl-jasmine:
3564
docker:
3665
# need '-browsers' version to test in real (xvfb-wrapped) browsers
@@ -214,6 +243,9 @@ jobs:
214243
- store_artifacts:
215244
path: dist
216245
destination: dist
246+
- run:
247+
name: View dist/README.md diff between previous and next releases (including new bundle sizes)
248+
command: git --no-pager diff --color-words tags/$(git describe --tags --abbrev=0) dist/README.md || true
217249
- run:
218250
name: Preview plot-schema diff between previous and next releases (only on master)
219251
command: |
@@ -246,6 +278,9 @@ jobs:
246278
- run:
247279
name: Test plotly bundles againt unexpected characters
248280
command: npm run no-bad-char
281+
- run:
282+
name: Display function constructors in plotly.js bundle
283+
command: npm run log-new-func
249284
- run:
250285
name: Test certain bundles against function constructors
251286
command: npm run no-new-func
@@ -258,6 +293,9 @@ workflows:
258293
build-and-test:
259294
jobs:
260295
- install-and-cibuild
296+
- timezone-jasmine:
297+
requires:
298+
- install-and-cibuild
261299
- bundle-jasmine:
262300
requires:
263301
- install-and-cibuild

.circleci/env_image.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ sudo python3 .circleci/download_google_fonts.py && \
55
sudo cp -r .circleci/fonts/ /usr/share/ && \
66
sudo fc-cache -f && \
77
# install kaleido & plotly
8-
sudo python3 -m pip install kaleido==0.2.1 plotly==5.1.0 --progress-bar off
8+
sudo python3 -m pip install kaleido==0.2.1 plotly==5.2.1 --progress-bar off

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ To see all merged commits on the master branch that will be part of the next plo
99

1010
where X.Y.Z is the semver of most recent plotly.js release.
1111

12+
## [2.3.1] -- 2021-07-30
13+
14+
### Fixed
15+
- Fix period positioned hover to work in different time zones as well as on grouped bars [[#5864](https://github.com/plotly/plotly.js/pull/5864)]
16+
- Use ids from axes when making hover data keys [[#5852](https://github.com/plotly/plotly.js/pull/5852)]
17+
- Do not include regl based traces `parcoords`, `splom`, `scattergl` and `scatterpolargl` in the "strict" bundle so that it could be used with CSP without WebGL warning [[#5865](https://github.com/plotly/plotly.js/pull/5865)]
18+
19+
1220
## [2.3.0] -- 2021-07-23
1321

1422
### Added

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
5555
5656
```html
5757
<head>
58-
<script src="https://cdn.plot.ly/plotly-2.3.0.min.js"></script>
58+
<script src="https://cdn.plot.ly/plotly-2.3.1.min.js"></script>
5959
</head>
6060
<body>
6161
<div id="gd"></div>
@@ -72,7 +72,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
7272
Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag.
7373
```html
7474
<script type="module">
75-
import "https://cdn.plot.ly/plotly-2.3.0.min.js"
75+
import "https://cdn.plot.ly/plotly-2.3.1.min.js"
7676
Plotly.newPlot("gd", [{ y: [1, 2, 3] }])
7777
</script>
7878
```
@@ -82,7 +82,7 @@ Fastly supports Plotly.js with free CDN service. Read more at <https://www.fastl
8282
### Un-minified versions are also available on CDN
8383
While non-minified source files may contain characters outside UTF-8, it is recommended that you specify the `charset` when loading those bundles.
8484
```html
85-
<script src="https://cdn.plot.ly/plotly-2.3.0.js" charset="utf-8"></script>
85+
<script src="https://cdn.plot.ly/plotly-2.3.1.js" charset="utf-8"></script>
8686
```
8787

8888
> Please note that as of v2 the "plotly-latest" outputs (e.g. https://cdn.plot.ly/plotly-latest.min.js) will no longer be updated on the CDN, and will stay at the last v1 patch v1.58.5. Therefore, to use the CDN with plotly.js v2 and higher, you must specify an exact plotly.js version.
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Security-Policy" content="script-src 'self'; worker-src blob:; ">
5+
<title>Plotly.js "strict" Devtools</title>
6+
7+
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans:600,400,300,200|Droid+Sans|PT+Sans+Narrow|Gravitas+One|Droid+Sans+Mono|Droid+Serif|Raleway|Old+Standard+TT"/>
8+
<link rel="stylesheet" type="text/css" href="./style.css">
9+
</head>
10+
<body>
11+
<header>
12+
<img src="http://images.plot.ly/logo/[email protected]" onClick="Tabs.reload();" />
13+
<span id="reload-time"></span>
14+
15+
<input id="mocks-search" type="text" placeholder="mocks search" />
16+
</header>
17+
18+
<section id="mocks-list"></section>
19+
<div id="plots">
20+
<div id="graph"></div>
21+
</div>
22+
<div id="snapshot"></div>
23+
24+
<script src="../../node_modules/mathjax/MathJax.js?config=TeX-AMS-MML_SVG"></script>
25+
<script charset="utf-8" id="source" src="../../build/plotly.js"></script>
26+
<script charset="utf-8" src="../../build/test_dashboard-bundle.js"></script>
27+
</body>
28+
</html>

devtools/test_dashboard/server.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ var http = require('http');
44
var ecstatic = require('ecstatic');
55
var open = require('open');
66
var browserify = require('browserify');
7+
var minimist = require('minimist');
78

89
var constants = require('../../tasks/util/constants');
910
var makeWatchifiedBundle = require('../../tasks/util/watchified_bundle');
1011
var shortcutPaths = require('../../tasks/util/shortcut_paths');
1112

12-
var PORT = process.argv[2] || 3000;
13-
13+
var args = minimist(process.argv.slice(2), {});
14+
var PORT = args.port || 3000;
15+
var strict = args.strict;
1416

1517
// Create server
1618
var server = http.createServer(ecstatic({
@@ -21,9 +23,9 @@ var server = http.createServer(ecstatic({
2123
}));
2224

2325
// Make watchified bundle for plotly.js
24-
var bundlePlotly = makeWatchifiedBundle(function() {
26+
var bundlePlotly = makeWatchifiedBundle(strict, function() {
2527
// open up browser window on first bundle callback
26-
open('http://localhost:' + PORT + '/devtools/test_dashboard/index.html');
28+
open('http://localhost:' + PORT + '/devtools/test_dashboard/index' + (strict ? '-strict' : '') + '.html');
2729
});
2830

2931
// Bundle devtools code

dist/README.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ The main plotly.js bundles weight in at:
4646
| 8.1 MB | 3.4 MB | 1 MB | 8.4 MB |
4747

4848
#### CDN links
49-
> https://cdn.plot.ly/plotly-2.3.0.js
49+
> https://cdn.plot.ly/plotly-2.3.1.js
5050
51-
> https://cdn.plot.ly/plotly-2.3.0.min.js
51+
> https://cdn.plot.ly/plotly-2.3.1.min.js
5252
5353

5454
#### npm packages
@@ -91,12 +91,12 @@ The `basic` partial bundle contains trace modules `bar`, `pie` and `scatter`.
9191

9292
| Raw size | Minified size | Minified + gzip size |
9393
|------|-----------------|------------------------|
94-
| 2.7 MB | 971.3 kB | 315.8 kB |
94+
| 2.7 MB | 971.4 kB | 315.8 kB |
9595

9696
#### CDN links
97-
> https://cdn.plot.ly/plotly-basic-2.3.0.js
97+
> https://cdn.plot.ly/plotly-basic-2.3.1.js
9898
99-
> https://cdn.plot.ly/plotly-basic-2.3.0.min.js
99+
> https://cdn.plot.ly/plotly-basic-2.3.1.min.js
100100
101101

102102
#### npm packages
@@ -117,9 +117,9 @@ The `cartesian` partial bundle contains trace modules `bar`, `box`, `contour`, `
117117
| 3.3 MB | 1.2 MB | 387.3 kB |
118118

119119
#### CDN links
120-
> https://cdn.plot.ly/plotly-cartesian-2.3.0.js
120+
> https://cdn.plot.ly/plotly-cartesian-2.3.1.js
121121
122-
> https://cdn.plot.ly/plotly-cartesian-2.3.0.min.js
122+
> https://cdn.plot.ly/plotly-cartesian-2.3.1.min.js
123123
124124

125125
#### npm packages
@@ -140,9 +140,9 @@ The `geo` partial bundle contains trace modules `choropleth`, `scatter` and `sca
140140
| 3 MB | 1.1 MB | 358.7 kB |
141141

142142
#### CDN links
143-
> https://cdn.plot.ly/plotly-geo-2.3.0.js
143+
> https://cdn.plot.ly/plotly-geo-2.3.1.js
144144
145-
> https://cdn.plot.ly/plotly-geo-2.3.0.min.js
145+
> https://cdn.plot.ly/plotly-geo-2.3.1.min.js
146146
147147

148148
#### npm packages
@@ -163,9 +163,9 @@ The `gl3d` partial bundle contains trace modules `cone`, `isosurface`, `mesh3d`,
163163
| 3.7 MB | 1.5 MB | 471.1 kB |
164164

165165
#### CDN links
166-
> https://cdn.plot.ly/plotly-gl3d-2.3.0.js
166+
> https://cdn.plot.ly/plotly-gl3d-2.3.1.js
167167
168-
> https://cdn.plot.ly/plotly-gl3d-2.3.0.min.js
168+
> https://cdn.plot.ly/plotly-gl3d-2.3.1.min.js
169169
170170

171171
#### npm packages
@@ -186,9 +186,9 @@ The `gl2d` partial bundle contains trace modules `heatmapgl`, `parcoords`, `poin
186186
| 3.8 MB | 1.5 MB | 491.9 kB |
187187

188188
#### CDN links
189-
> https://cdn.plot.ly/plotly-gl2d-2.3.0.js
189+
> https://cdn.plot.ly/plotly-gl2d-2.3.1.js
190190
191-
> https://cdn.plot.ly/plotly-gl2d-2.3.0.min.js
191+
> https://cdn.plot.ly/plotly-gl2d-2.3.1.min.js
192192
193193

194194
#### npm packages
@@ -206,12 +206,12 @@ The `mapbox` partial bundle contains trace modules `choroplethmapbox`, `densitym
206206

207207
| Raw size | Minified size | Minified + gzip size |
208208
|------|-----------------|------------------------|
209-
| 4.3 MB | 1.7 MB | 512.9 kB |
209+
| 4.3 MB | 1.7 MB | 513 kB |
210210

211211
#### CDN links
212-
> https://cdn.plot.ly/plotly-mapbox-2.3.0.js
212+
> https://cdn.plot.ly/plotly-mapbox-2.3.1.js
213213
214-
> https://cdn.plot.ly/plotly-mapbox-2.3.0.min.js
214+
> https://cdn.plot.ly/plotly-mapbox-2.3.1.min.js
215215
216216

217217
#### npm packages
@@ -232,9 +232,9 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne
232232
| 2.9 MB | 1.1 MB | 348.4 kB |
233233

234234
#### CDN links
235-
> https://cdn.plot.ly/plotly-finance-2.3.0.js
235+
> https://cdn.plot.ly/plotly-finance-2.3.1.js
236236
237-
> https://cdn.plot.ly/plotly-finance-2.3.0.min.js
237+
> https://cdn.plot.ly/plotly-finance-2.3.1.min.js
238238
239239

240240
#### npm packages
@@ -246,18 +246,18 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne
246246

247247
### plotly.js strict
248248

249-
The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `candlestick`, `carpet`, `choropleth`, `choroplethmapbox`, `contour`, `contourcarpet`, `densitymapbox`, `funnel`, `funnelarea`, `heatmap`, `histogram`, `histogram2d`, `histogram2dcontour`, `icicle`, `image`, `indicator`, `ohlc`, `parcats`, `parcoords`, `pie`, `sankey`, `scatter`, `scattercarpet`, `scattergeo`, `scattergl`, `scattermapbox`, `scatterpolar`, `scatterpolargl`, `scatterternary`, `splom`, `sunburst`, `table`, `treemap`, `violin` and `waterfall`.
249+
The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `candlestick`, `carpet`, `choropleth`, `choroplethmapbox`, `contour`, `contourcarpet`, `densitymapbox`, `funnel`, `funnelarea`, `heatmap`, `histogram`, `histogram2d`, `histogram2dcontour`, `icicle`, `image`, `indicator`, `ohlc`, `parcats`, `pie`, `sankey`, `scatter`, `scattercarpet`, `scattergeo`, `scattermapbox`, `scatterpolar`, `scatterternary`, `sunburst`, `table`, `treemap`, `violin` and `waterfall`.
250250

251251
#### Stats
252252

253253
| Raw size | Minified size | Minified + gzip size |
254254
|------|-----------------|------------------------|
255-
| 6.9 MB | 2.8 MB | 860.5 kB |
255+
| 6.3 MB | 2.5 MB | 763.6 kB |
256256

257257
#### CDN links
258-
> https://cdn.plot.ly/plotly-strict-2.3.0.js
258+
> https://cdn.plot.ly/plotly-strict-2.3.1.js
259259
260-
> https://cdn.plot.ly/plotly-strict-2.3.0.min.js
260+
> https://cdn.plot.ly/plotly-strict-2.3.1.min.js
261261
262262

263263
#### npm packages

0 commit comments

Comments
 (0)