Skip to content

Commit 2429e55

Browse files
authored
Merge pull request #1 from geopozo/pikul-music-import-promise
Update to your pull-request for making es5/require work.
2 parents 159ca1b + 3127dee commit 2429e55

File tree

255 files changed

+283850
-270039
lines changed

Some content is hidden

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

255 files changed

+283850
-270039
lines changed

.circleci/config.yml

Lines changed: 101 additions & 0 deletions
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
@@ -253,6 +292,25 @@ jobs:
253292
paths:
254293
- plotly.js
255294

295+
make-baselines-b64:
296+
parallelism: 4
297+
docker:
298+
- image: circleci/python:3.8.9
299+
working_directory: ~/plotly.js
300+
steps:
301+
- attach_workspace:
302+
at: ~/
303+
- run:
304+
name: Install kaleido, plotly.io and required fonts
305+
command: .circleci/env_image.sh
306+
- run:
307+
name: Create all png files
308+
command: .circleci/test.sh make-baselines-b64
309+
- persist_to_workspace:
310+
root: ~/
311+
paths:
312+
- plotly.js
313+
256314
test-baselines:
257315
docker:
258316
- image: circleci/node:16.9.0
@@ -267,6 +325,34 @@ jobs:
267325
path: build
268326
destination: /
269327

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+
342+
test-baselines-b64:
343+
docker:
344+
- image: circleci/node:16.9.0
345+
working_directory: ~/plotly.js
346+
steps:
347+
- attach_workspace:
348+
at: ~/
349+
- run:
350+
name: Compare pixels
351+
command: .circleci/test.sh test-image ; find build -maxdepth 1 -type f -delete
352+
- store_artifacts:
353+
path: build
354+
destination: /
355+
270356
test-baselines-mathjax3:
271357
docker:
272358
- image: circleci/node:16.9.0
@@ -441,15 +527,30 @@ workflows:
441527
- webgl-jasmine:
442528
requires:
443529
- install-and-cibuild
530+
- virtual-webgl-jasmine:
531+
requires:
532+
- install-and-cibuild
444533
- flaky-no-gl-jasmine:
445534
requires:
446535
- 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
447542
- make-baselines-mathjax3:
448543
requires:
449544
- install-and-cibuild
450545
- test-baselines-mathjax3:
451546
requires:
452547
- make-baselines-mathjax3
548+
- make-baselines-b64:
549+
requires:
550+
- install-and-cibuild
551+
- test-baselines-b64:
552+
requires:
553+
- make-baselines-b64
453554
- make-baselines:
454555
requires:
455556
- install-and-cibuild

.circleci/env_image.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ sudo cp -r .circleci/fonts/ /usr/share/ && \
66
sudo fc-cache -f && \
77
# install kaleido & plotly
88
sudo python3 -m pip install kaleido==0.2.1 plotly==5.5.0 --progress-bar off
9+
# install numpy i.e. to convert arrays to typed arrays
10+
sudo python3 -m pip install numpy==1.24.2

.circleci/test.sh

Lines changed: 30 additions & 0 deletions
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,11 +92,26 @@ 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
88107
;;
89108

109+
make-baselines-b64)
110+
SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | sed 's/\.json$//1' | circleci tests split)
111+
python3 test/image/make_baseline.py b64 $SUITE || EXIT_STATE=$?
112+
exit $EXIT_STATE
113+
;;
114+
90115
make-baselines)
91116
SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | sed 's/\.json$//1' | circleci tests split)
92117
python3 test/image/make_baseline.py $SUITE || EXIT_STATE=$?
@@ -103,6 +128,11 @@ case $1 in
103128
exit $EXIT_STATE
104129
;;
105130

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+
106136
source-syntax)
107137
npm run lint || EXIT_STATE=$?
108138
npm run test-syntax || EXIT_STATE=$?

.eslintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
"Float32Array": true,
1515
"Float64Array": true,
1616
"Uint8Array": true,
17+
"Int8Array": true,
18+
"Uint8ClampedArray": true,
1719
"Int16Array": true,
20+
"Uint16Array": true,
1821
"Int32Array": true,
22+
"Uint32Array": true,
1923
"ArrayBuffer": true,
2024
"DataView": true,
2125
"SVGElement": false

CHANGELOG.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,120 @@ 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.28.0] -- 2024-01-05
13+
14+
### Added
15+
- Add `align` option to sankey nodes to control horizontal alignment [[#6800](https://github.com/plotly/plotly.js/pull/6800)],
16+
with thanks to @adamreeve for the contribution!
17+
- Add the possibility of loading "virtual-webgl" script for WebGL 1 to help display several WebGL contexts on a page [[#6784](https://github.com/plotly/plotly.js/pull/6784)], with thanks to @greggman for the contribution!
18+
- Add options to use base64 encoding (`bdata`) and `shape` (for 2 dimensional arrays) to declare various typed arrays i.e. `dtype=(float64|float32|int32|int16|int8|uint32|uint16|uint8)` [[#5230](https://github.com/plotly/plotly.js/pull/5230)]
19+
20+
### Fixed
21+
- Fix scattergl rendering bug on M1 mac devices [[#6830](https://github.com/plotly/plotly.js/pull/6830)],
22+
with thanks to @justinjhendrick for the contribution!
23+
- Fix hovering over sankey node only fully highlights first trace [[#6799](https://github.com/plotly/plotly.js/pull/6799)],
24+
with thanks to @DominicWuest for the contribution!
25+
- Fix error when the mouse moves to x=0 while dragging a rangeslider [[#6780](https://github.com/plotly/plotly.js/pull/6780)],
26+
with thanks to @david-bezero for the contribution!
27+
- Fix duplicated of major and minor ticks in calc data [[#6829](https://github.com/plotly/plotly.js/pull/6829)],
28+
with thanks to @ayjayt for the contribution!
29+
- Fix charset test dashboard [[#6826](https://github.com/plotly/plotly.js/pull/6826)],
30+
with thanks to @ayjayt for the contribution!
31+
- Fix range defaults to take into account `minallowed` and `maxallowed` values of the axis [[#6796](https://github.com/plotly/plotly.js/pull/6796)]
32+
- Fix `scattergl` legend when `marker.angle` is an array [[#6787](https://github.com/plotly/plotly.js/pull/6787)]
33+
- Fix plot schema not to show `line.shape` options for `scatterpolargl` trace [[#6781](https://github.com/plotly/plotly.js/pull/6781)]
34+
35+
36+
## [2.27.1] -- 2023-11-08
37+
38+
### Changed
39+
- 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)]
40+
41+
### Fixed
42+
- Fix handling multi-line text in title `automargin` [[#6758](https://github.com/plotly/plotly.js/pull/6758)]
43+
44+
45+
## [2.27.0] -- 2023-10-20
46+
47+
### Added
48+
- Add `insiderange` to cartesian axes to help avoid overlap between visible grid lines and tick labels of the counter axis when they are positioned inside [[#6735](https://github.com/plotly/plotly.js/pull/6735)],
49+
this feature was anonymously sponsored: thank you to our sponsor!
50+
51+
### Fixed
52+
- Fix column order changes on hover [[#6718](https://github.com/plotly/plotly.js/pull/6718)],
53+
with thanks to @bhavinpatel1109 for the contribution!
54+
- Fix hover at timestamp '1970-01-01 00:00:00' [[#6752](https://github.com/plotly/plotly.js/pull/6752)],
55+
with thanks to @adamjhawley for the contribution!
56+
- Fix clearing empty `candlestick` using react [[#6757](https://github.com/plotly/plotly.js/pull/6757)]
57+
58+
59+
## [2.26.2] -- 2023-10-04
60+
61+
### Fixed
62+
- Fix range interactions affecting partial ranges in other subplots [[#6743](https://github.com/plotly/plotly.js/pull/6743)]
63+
- Fix to emit `plotly_click` event on touchscreens with "select" `dragmode` [[#6724](https://github.com/plotly/plotly.js/pull/6724)]),
64+
with thanks to @lvlte for the contribution!
65+
- Fix error display for failing builds [[#6739](https://github.com/plotly/plotly.js/pull/6739)],
66+
with thanks to @dmt0 for the contribution!
67+
- Use the "willReadFrequently" 2d context creation attribute to optimize readback performance for heat map traces [[#6741](https://github.com/plotly/plotly.js/pull/6741)],
68+
with thanks to @bebeal for the contribution!
69+
70+
71+
## [2.26.1] -- 2023-09-22
72+
73+
### Fixed
74+
- Fix horizontal title alignment [[#6725](https://github.com/plotly/plotly.js/issues/6725)],
75+
with thanks to @28raining for the contribution!
76+
- Fix single-point histogram when user has provided bin widths [[#6725](https://github.com/plotly/plotly.js/issues/6725)],
77+
with thanks to @28raining for the contribution!
78+
- Fix to allow custom `plotly_legenddoubleclick` handlers to execute even when the default `plotly_legendclick` event is cancelled (returns false) [[#6727](https://github.com/plotly/plotly.js/pull/6727)], with thanks to @andrej-vasilj for the contribution!
79+
- Fix Finnish translation for "Download plot" in `fi` locale [[#6723](https://github.com/plotly/plotly.js/issues/6723)],
80+
with thanks to @wkmor1 for the contribution!
81+
- Fix Czech number separators in `cs` locale [[#6734](https://github.com/plotly/plotly.js/pull/6734)],
82+
with thanks to @vlastimil-dolejs for the contribution!
83+
84+
85+
## [2.26.0] -- 2023-08-24
86+
87+
### Added
88+
- Add "min", "max", "min reversed" and "max reversed" autorange options and handle partial ranges (i.e. one end being null), add `autorangeoptions` (`clipmin`, `clipmax`, `minallowed`, `maxallowed`, `include`) as well as `minallowed` and `maxallowed` to cartesian, gl3d and radial axes [[#6547](https://github.com/plotly/plotly.js/pull/6547)]
89+
- Add [n]-sigma (std deviations) box plots as an alternative to quartiles [[#6697](https://github.com/plotly/plotly.js/issues/6697)], with thanks to @28raining for the contribution!
90+
- Add "top left" & "top center" side options to legend title [[#6711](https://github.com/plotly/plotly.js/pull/6711)], with thanks to @28raining for the contribution!
91+
- Add "false" option to `scaleanchor` to allow removing a constraint that is set by default [[#6712](https://github.com/plotly/plotly.js/pull/6712)], with thanks to @lvlte for the contribution!
92+
93+
94+
## [2.25.2] -- 2023-08-11
95+
96+
### Changed
97+
- Update Croatian translations in `hr` locale [[#6690](https://github.com/plotly/plotly.js/pull/6690)],
98+
with thanks to @Mkranj for the contribution!
99+
100+
### Fixed
101+
- Fix potential prototype pollution in plot API calls [[#6703](https://github.com/plotly/plotly.js/pull/6703), [6704](https://github.com/plotly/plotly.js/pull/6704)]
102+
103+
104+
## [2.25.1] -- 2023-08-02
105+
106+
### Fixed
107+
- Fix clearing legend using react (regression introduced in 2.25.0) [[#6695](https://github.com/plotly/plotly.js/pull/6695)]
108+
109+
110+
## [2.25.0] -- 2023-07-25
111+
112+
### Added
113+
- Add "Equal Earth" projection to geo subplots [[#6670](https://github.com/plotly/plotly.js/pull/6670)],
114+
with thanks to @apparebit for the contribution!
115+
- Add options to include legends for shapes and `newshape` [[#6653](https://github.com/plotly/plotly.js/pull/6653)]
116+
- Add Plotly.deleteActiveShape command [[#6679](https://github.com/plotly/plotly.js/pull/6679)]
117+
118+
### Fixed
119+
- Fix contour plot colorscale domain (take account of `zmin`, `zmax`, `cmin` and `cmax`) [[#6625](https://github.com/plotly/plotly.js/pull/6625)],
120+
with thanks to @lvlte for the contribution!
121+
- Fix text markers on non-mapbox styled maps [[#6652](https://github.com/plotly/plotly.js/pull/6652)],
122+
with thanks to @baurt for the contribution!
123+
- Fix unhide isolated traces in multi legend cases (regression introduced in 2.24.3) [[#6684](https://github.com/plotly/plotly.js/pull/6684)]
124+
125+
12126
## [2.24.3] -- 2023-07-05
13127

14128
### Fixed

README.md

Lines changed: 8 additions & 3 deletions
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.24.3.min.js" charset="utf-8"></script>
58+
<script src="https://cdn.plot.ly/plotly-2.28.0.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.24.3.min.js"
75+
import "https://cdn.plot.ly/plotly-2.28.0.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.24.3.js" charset="utf-8"></script>
85+
<script src="https://cdn.plot.ly/plotly-2.28.0.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.
@@ -100,6 +100,11 @@ You could load either version two or version three of MathJax files, for example
100100
> When using MathJax version 3, it is also possible to use `chtml` output on the other parts of the page in addition to `svg` output for the plotly graph.
101101
Please refer to `devtools/test_dashboard/index-mathjax3chtml.html` to see an example.
102102

103+
### Need to have several WebGL graphs on a page?
104+
You may simply load [virtual-webgl](https://github.com/greggman/virtual-webgl) script for WebGL 1 (not WebGL 2) before loading other scripts.
105+
```html
106+
<script src="https://unpkg.com/virtual-webgl@1.0.6/src/virtual-webgl.js"></script>
107+
```
103108

104109
## Bundles
105110
There are two kinds of plotly.js bundles:

devtools/test_dashboard/index-mathjax3.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html>
33
<head>
44
<title>Plotly.js Devtools - MathJax v3 loaded with svg output</title>
5+
<meta charset="utf-8">
56
<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"/>
67
<link rel="stylesheet" type="text/css" href="./style.css">
78
</head>

devtools/test_dashboard/index-mathjax3chtml.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html>
33
<head>
44
<title>Plotly.js Devtools - MathJax v3 loaded with chtml output</title>
5+
<meta charset="utf-8">
56
<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"/>
67
<link rel="stylesheet" type="text/css" href="./style.css">
78
</head>

0 commit comments

Comments
 (0)