Skip to content

Commit cae76aa

Browse files
committed
Merge remote-tracking branch 'origin/master' into handle-coded-typed-arrays
2 parents 3314377 + 17f7013 commit cae76aa

Some content is hidden

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

73 files changed

+1012
-282
lines changed

.circleci/config.yml

+62
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,26 @@ jobs:
122122
name: Run jasmine tests (part B)
123123
command: .circleci/test.sh webgl-jasmine
124124

125+
virtual-webgl-jasmine:
126+
docker:
127+
# need '-browsers' version to test in real (xvfb-wrapped) browsers
128+
- image: cimg/node:16.17.1-browsers
129+
environment:
130+
# Alaska time (arbitrary timezone to test date logic)
131+
TZ: "America/Anchorage"
132+
parallelism: 8
133+
working_directory: ~/plotly.js
134+
steps:
135+
- browser-tools/install-browser-tools: &browser-versions
136+
chrome-version: 110.0.5481.100
137+
install-firefox: false
138+
install-geckodriver: false
139+
- attach_workspace:
140+
at: ~/
141+
- run:
142+
name: Run jasmine tests (part B)
143+
command: .circleci/test.sh virtual-webgl-jasmine
144+
125145
flaky-no-gl-jasmine:
126146
docker:
127147
# need '-browsers' version to test in real (xvfb-wrapped) browsers
@@ -216,6 +236,25 @@ jobs:
216236
name: Test MathJax on firefox-latest
217237
command: .circleci/test.sh mathjax-firefox82+
218238

239+
make-baselines-virtual-webgl:
240+
parallelism: 2
241+
docker:
242+
- image: circleci/python:3.8.9
243+
working_directory: ~/plotly.js
244+
steps:
245+
- attach_workspace:
246+
at: ~/
247+
- run:
248+
name: Install kaleido, plotly.io and required fonts
249+
command: .circleci/env_image.sh
250+
- run:
251+
name: Create png files using virtual-webgl & WebGL v1
252+
command: .circleci/test.sh make-baselines-virtual-webgl
253+
- persist_to_workspace:
254+
root: ~/
255+
paths:
256+
- plotly.js
257+
219258
make-baselines-mathjax3:
220259
docker:
221260
- image: circleci/python:3.8.9
@@ -286,6 +325,20 @@ jobs:
286325
path: build
287326
destination: /
288327

328+
test-baselines-virtual-webgl:
329+
docker:
330+
- image: circleci/node:16.9.0
331+
working_directory: ~/plotly.js
332+
steps:
333+
- attach_workspace:
334+
at: ~/
335+
- run:
336+
name: Compare pixels
337+
command: .circleci/test.sh test-image-virtual-webgl ; find build -maxdepth 1 -type f -delete
338+
- store_artifacts:
339+
path: build
340+
destination: /
341+
289342
test-baselines-b64:
290343
docker:
291344
- image: circleci/node:16.9.0
@@ -474,9 +527,18 @@ workflows:
474527
- webgl-jasmine:
475528
requires:
476529
- install-and-cibuild
530+
- virtual-webgl-jasmine:
531+
requires:
532+
- install-and-cibuild
477533
- flaky-no-gl-jasmine:
478534
requires:
479535
- install-and-cibuild
536+
- make-baselines-virtual-webgl:
537+
requires:
538+
- install-and-cibuild
539+
- test-baselines-virtual-webgl:
540+
requires:
541+
- make-baselines-virtual-webgl
480542
- make-baselines-mathjax3:
481543
requires:
482544
- install-and-cibuild

.circleci/test.sh

+24
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ case $1 in
5353
exit $EXIT_STATE
5454
;;
5555

56+
virtual-webgl-jasmine)
57+
SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --limit=5 --tag=gl | circleci tests split))
58+
for s in ${SHARDS[@]}; do
59+
MAX_AUTO_RETRY=2
60+
retry ./node_modules/karma/bin/karma start test/jasmine/karma.conf.js --virtualWebgl --tags=gl --skip-tags=noCI,noVirtualWebgl --doNotFailOnEmptyTestSuite -- "$s"
61+
done
62+
63+
exit $EXIT_STATE
64+
;;
65+
5666
flaky-no-gl-jasmine)
5767
SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --limit=1 --tag=flaky | circleci tests split))
5868

@@ -82,6 +92,15 @@ case $1 in
8292
exit $EXIT_STATE
8393
;;
8494

95+
make-baselines-virtual-webgl)
96+
SUITE=$({\
97+
find $ROOT/test/image/mocks/gl* -type f -printf "%f\n"; \
98+
find $ROOT/test/image/mocks/mapbox* -type f -printf "%f\n"; \
99+
} | sed 's/\.json$//1' | circleci tests split)
100+
python3 test/image/make_baseline.py virtual-webgl $SUITE || EXIT_STATE=$?
101+
exit $EXIT_STATE
102+
;;
103+
85104
make-baselines-mathjax3)
86105
python3 test/image/make_baseline.py mathjax3 legend_mathjax_title_and_items mathjax parcats_grid_subplots table_latex_multitrace_scatter table_plain_birds table_wrapped_birds ternary-mathjax || EXIT_STATE=$?
87106
exit $EXIT_STATE
@@ -109,6 +128,11 @@ case $1 in
109128
exit $EXIT_STATE
110129
;;
111130

131+
test-image-virtual-webgl)
132+
node test/image/compare_pixels_test.js virtual-webgl || { tar -cvf build/baselines.tar build/test_images/*.png ; exit 1 ; } || EXIT_STATE=$?
133+
exit $EXIT_STATE
134+
;;
135+
112136
source-syntax)
113137
npm run lint || EXIT_STATE=$?
114138
npm run test-syntax || EXIT_STATE=$?

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ 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.27.1] -- 2023-11-08
13+
14+
### Changed
15+
- Adjust stamen styles to point to `stadiamaps.com`, the users may also need to provide their own API_KEY via `config.mapboxAccessToken` [[#6776](https://github.com/plotly/plotly.js/pull/6776), [#6778](https://github.com/plotly/plotly.js/pull/6778)]
16+
17+
### Fixed
18+
- Fix handling multi-line text in title `automargin` [[#6758](https://github.com/plotly/plotly.js/pull/6758)]
19+
20+
1221
## [2.27.0] -- 2023-10-20
1322

1423
### 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.27.0.min.js" charset="utf-8"></script>
58+
<script src="https://cdn.plot.ly/plotly-2.27.1.min.js" charset="utf-8"></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.27.0.min.js"
75+
import "https://cdn.plot.ly/plotly-2.27.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.27.0.js" charset="utf-8"></script>
85+
<script src="https://cdn.plot.ly/plotly-2.27.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.

dist/README.md

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

4848
#### CDN links
49-
> https://cdn.plot.ly/plotly-2.27.0.js
49+
> https://cdn.plot.ly/plotly-2.27.1.js
5050
51-
> https://cdn.plot.ly/plotly-2.27.0.min.js
51+
> https://cdn.plot.ly/plotly-2.27.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.6 MB | 975 kB | 326.1 kB |
94+
| 2.6 MB | 975.2 kB | 326.2 kB |
9595

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

102102
#### npm packages
@@ -114,12 +114,12 @@ The `cartesian` partial bundle contains trace modules `bar`, `box`, `contour`, `
114114

115115
| Raw size | Minified size | Minified + gzip size |
116116
|------|-----------------|------------------------|
117-
| 3.3 MB | 1.2 MB | 412.4 kB |
117+
| 3.3 MB | 1.2 MB | 412.5 kB |
118118

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

125125
#### npm packages
@@ -137,12 +137,12 @@ The `geo` partial bundle contains trace modules `choropleth`, `scatter` and `sca
137137

138138
| Raw size | Minified size | Minified + gzip size |
139139
|------|-----------------|------------------------|
140-
| 3.1 MB | 1.1 MB | 370.1 kB |
140+
| 3.1 MB | 1.1 MB | 370.2 kB |
141141

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

148148
#### npm packages
@@ -160,12 +160,12 @@ The `gl3d` partial bundle contains trace modules `cone`, `isosurface`, `mesh3d`,
160160

161161
| Raw size | Minified size | Minified + gzip size |
162162
|------|-----------------|------------------------|
163-
| 3.6 MB | 1.5 MB | 490.7 kB |
163+
| 3.6 MB | 1.5 MB | 490.8 kB |
164164

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

171171
#### npm packages
@@ -183,12 +183,12 @@ The `gl2d` partial bundle contains trace modules `heatmapgl`, `parcoords`, `poin
183183

184184
| Raw size | Minified size | Minified + gzip size |
185185
|------|-----------------|------------------------|
186-
| 4.4 MB | 1.8 MB | 596.5 kB |
186+
| 4.4 MB | 1.8 MB | 596.6 kB |
187187

188188
#### CDN links
189-
> https://cdn.plot.ly/plotly-gl2d-2.27.0.js
189+
> https://cdn.plot.ly/plotly-gl2d-2.27.1.js
190190
191-
> https://cdn.plot.ly/plotly-gl2d-2.27.0.min.js
191+
> https://cdn.plot.ly/plotly-gl2d-2.27.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.4 MB | 1.7 MB | 527.3 kB |
209+
| 4.4 MB | 1.7 MB | 527.4 kB |
210210

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

217217
#### npm packages
@@ -229,12 +229,12 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne
229229

230230
| Raw size | Minified size | Minified + gzip size |
231231
|------|-----------------|------------------------|
232-
| 2.8 MB | 1 MB | 354.8 kB |
232+
| 2.8 MB | 1 MB | 354.9 kB |
233233

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

240240
#### npm packages
@@ -255,9 +255,9 @@ The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `ca
255255
| 8.6 MB | 3.7 MB | 1.1 MB |
256256

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

263263
#### npm packages

dist/plotly-basic.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (basic) v2.27.0
2+
* plotly.js (basic) v2.27.1
33
* Copyright 2012-2023, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -35180,6 +35180,17 @@ exports.drawMainTitle = function (gd) {
3518035180
'text-anchor': textAnchor,
3518135181
dy: getMainTitleDyAdj(title.yanchor)
3518235182
}).call(svgTextUtils.positionText, x, y);
35183+
var extraLines = (title.text.match(svgTextUtils.BR_TAG_ALL) || []).length;
35184+
if (extraLines) {
35185+
var delta = alignmentConstants.LINE_SPACING * extraLines + alignmentConstants.MID_SHIFT;
35186+
if (title.y === 0) {
35187+
delta = -delta;
35188+
}
35189+
titleObj.selectAll('.line').each(function () {
35190+
var newDy = +this.getAttribute('dy').slice(0, -2) - delta + 'em';
35191+
this.setAttribute('dy', newDy);
35192+
});
35193+
}
3518335194
}
3518435195
}
3518535196
};
@@ -60645,7 +60656,7 @@ function getSortFunc(opts, d2c) {
6064560656

6064660657

6064760658
// package version injected by `npm run preprocess`
60648-
exports.version = '2.27.0';
60659+
exports.version = '2.27.1';
6064960660

6065060661
/***/ }),
6065160662

dist/plotly-basic.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plotly-cartesian.js

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (cartesian) v2.27.0
2+
* plotly.js (cartesian) v2.27.1
33
* Copyright 2012-2023, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -35338,6 +35338,17 @@ exports.drawMainTitle = function (gd) {
3533835338
'text-anchor': textAnchor,
3533935339
dy: getMainTitleDyAdj(title.yanchor)
3534035340
}).call(svgTextUtils.positionText, x, y);
35341+
var extraLines = (title.text.match(svgTextUtils.BR_TAG_ALL) || []).length;
35342+
if (extraLines) {
35343+
var delta = alignmentConstants.LINE_SPACING * extraLines + alignmentConstants.MID_SHIFT;
35344+
if (title.y === 0) {
35345+
delta = -delta;
35346+
}
35347+
titleObj.selectAll('.line').each(function () {
35348+
var newDy = +this.getAttribute('dy').slice(0, -2) - delta + 'em';
35349+
this.setAttribute('dy', newDy);
35350+
});
35351+
}
3534135352
}
3534235353
}
3534335354
};
@@ -71089,7 +71100,7 @@ function getSortFunc(opts, d2c) {
7108971100

7109071101

7109171102
// package version injected by `npm run preprocess`
71092-
exports.version = '2.27.0';
71103+
exports.version = '2.27.1';
7109371104

7109471105
/***/ }),
7109571106

@@ -91218,6 +91229,7 @@ process.umask = function() { return 0; };
9121891229
/***/ 71665:
9121991230
/***/ (function(module, exports, __webpack_require__) {
9122091231

91232+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
9122191233
/* eslint-disable node/no-deprecated-api */
9122291234
var buffer = __webpack_require__(12856)
9122391235
var Buffer = buffer.Buffer

0 commit comments

Comments
 (0)