Skip to content

Commit 05b909a

Browse files
Merge branch 'master' into label_automargin
2 parents 67b04e9 + e0e3ee1 commit 05b909a

File tree

237 files changed

+74104
-59679
lines changed

Some content is hidden

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

237 files changed

+74104
-59679
lines changed

.circleci/config.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@ version: 2.0
33
# Inspired by:
44
# https://github.com/CircleCI-Public/circleci-demo-workflows/blob/workspace-forwarding/.circleci/config.yml
55
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
6+
#
7+
# For list of official CircleCI node.js images, go to:
8+
# https://hub.docker.com/r/circleci/node/tags/
69

710
jobs:
811
build:
912
docker:
10-
- image: circleci/node:6.10.3
13+
- image: circleci/node:8.9.4
1114
working_directory: ~/plotly.js
1215
steps:
1316
- checkout
1417
- restore_cache:
1518
keys:
16-
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ checksum "package.json" }}
17-
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-master-{{ checksum "package.json" }}
19+
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ checksum "package-lock.json" }}
20+
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-master-{{ checksum "package-lock.json" }}
1821
- run:
1922
name: Install dependencies
2023
command: |
2124
npm install
22-
npm dedupe
23-
npm prune
24-
npm install
2525
- run:
2626
name: List dependency versions
2727
command: |
@@ -47,7 +47,7 @@ jobs:
4747
test-jasmine:
4848
docker:
4949
# need '-browsers' version to test in real (xvfb-wrapped) browsers
50-
- image: circleci/node:6.10.3-browsers
50+
- image: circleci/node:8.9.4-browsers
5151
working_directory: ~/plotly.js
5252
steps:
5353
- checkout
@@ -58,9 +58,26 @@ jobs:
5858
command: |
5959
sudo cp /usr/share/zoneinfo/America/Anchorage /etc/localtime
6060
- run:
61-
name: Run jasmine tests
61+
name: Run jasmine tests (batch 1)
6262
command: ./.circleci/test.sh jasmine
6363

64+
test-jasmine2:
65+
docker:
66+
# need '-browsers' version to test in real (xvfb-wrapped) browsers
67+
- image: circleci/node:8.9.4-browsers
68+
working_directory: ~/plotly.js
69+
steps:
70+
- checkout
71+
- attach_workspace:
72+
at: ~/plotly.js
73+
- run:
74+
name: Set timezone to Alaska time (arbitrary timezone to test date logic)
75+
command: |
76+
sudo cp /usr/share/zoneinfo/America/Anchorage /etc/localtime
77+
- run:
78+
name: Run jasmine tests (batch 2)
79+
command: ./.circleci/test.sh jasmine2
80+
6481
test-image:
6582
docker:
6683
- image: plotly/testbed:latest
@@ -82,7 +99,7 @@ jobs:
8299

83100
test-syntax:
84101
docker:
85-
- image: circleci/node:6.10.3
102+
- image: circleci/node:8.9.4
86103
working_directory: ~/plotly.js
87104
steps:
88105
- checkout
@@ -100,6 +117,9 @@ workflows:
100117
- test-jasmine:
101118
requires:
102119
- build
120+
- test-jasmine2:
121+
requires:
122+
- build
103123
- test-image:
104124
requires:
105125
- build

.circleci/test.sh

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,37 @@ set +e
55
set +o pipefail
66

77
EXIT_STATE=0
8+
MAX_AUTO_RETRY=5
9+
10+
# inspired by https://unix.stackexchange.com/a/82602
11+
retry () {
12+
local n=0
13+
14+
until [ $n -ge $MAX_AUTO_RETRY ]; do
15+
"$@" && break
16+
n=$[$n+1]
17+
echo ''
18+
echo run $n of $MAX_AUTO_RETRY failed, trying again ...
19+
echo ''
20+
sleep 15
21+
done
22+
23+
if [ $n -eq $MAX_AUTO_RETRY ]; then
24+
EXIT_STATE=1
25+
fi
26+
}
827

928
case $1 in
1029

1130
jasmine)
12-
npm run test-jasmine || EXIT_STATE=$?
13-
npm run test-bundle || EXIT_STATE=$?
31+
npm run test-jasmine -- --skip-tags=gl,noCI,flaky || EXIT_STATE=$?
32+
exit $EXIT_STATE
33+
;;
34+
35+
jasmine2)
36+
npm run test-jasmine -- --tags=gl --skip-tags=noCI,flaky || EXIT_STATE=$?
37+
retry npm run test-jasmine -- --tags=flaky --skip-tags=noCI
38+
npm run test-bundle || EXIT_STATE=$?
1439
exit $EXIT_STATE
1540
;;
1641

@@ -22,8 +47,8 @@ case $1 in
2247
;;
2348

2449
syntax)
25-
npm run lint || EXIT_STATE=$?
26-
npm run test-syntax || EXIT_STATE=$?
50+
npm run lint || EXIT_STATE=$?
51+
npm run test-syntax || EXIT_STATE=$?
2752
exit $EXIT_STATE
2853
;;
2954

.eslintrc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"no-trailing-spaces": [2],
2424
"no-multiple-empty-lines": [2, {"max": 2, "maxEOF": 0}],
2525
"eol-last": [2],
26-
"indent": [2, 4, {"SwitchCase": 1}],
26+
"indent": [0],
27+
"indent-legacy": [2, 4, {"SwitchCase": 1}],
2728
"max-len": [0, 80],
2829
"brace-style": [0, "stroustrup", {"allowSingleLine": true}],
2930
"curly": [2, "multi-line"],
@@ -46,7 +47,7 @@
4647
"space-before-blocks": [2],
4748
"spaced-comment": [2, "always"],
4849
"no-tabs": [2],
49-
"no-multi-spaces": [2],
50+
"no-multi-spaces": [2, {"ignoreEOLComments": true}],
5051
"no-whitespace-before-property": [2],
5152
"no-unexpected-multiline": [2],
5253
"no-floating-decimal": [2],
@@ -65,6 +66,7 @@
6566
"no-use-before-define": [2, "nofunc"],
6667
"no-loop-func": [2],
6768
"no-console": [0],
68-
"no-unused-labels": [2]
69+
"no-unused-labels": [2],
70+
"no-useless-escape": [0]
6971
}
7072
}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ Developers are strongly encouraged to first make a PR to their own plotly.js for
1515
Before opening a pull request, developer should:
1616

1717
- `git rebase` their local branch off the latest `master`,
18-
- make sure to **not** `git add` the `dist/` folder (the `dist/` is updated only on verion bumps),
18+
- make sure to **not** `git add` the `dist/` folder (the `dist/` is updated only on version bumps),
19+
- make sure to commit changes to the `package-lock.json` file (if any),
1920
- write an overview of what the PR attempts to do,
2021
- select the _Allow edits from maintainers_ option (see this [article](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) for more details).
2122

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,39 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master
1010
where X.Y.Z is the semver of most recent plotly.js release.
1111

1212

13+
## [1.34.0] -- 2018-02-12
14+
15+
### Added
16+
- Add `Plotly.react`, a new do-it-all API method that creates and update graphs
17+
using the same API signature [#2341]
18+
- Add constraint-type contours to `contour` traces [#2270]
19+
- Add `notched` and `notchwidth` attributes to `box` traces [#2305]
20+
- Add localization machinery to auto-formatted date axis ticks [#2261]
21+
- Add support for `text` in `mesh3d` traces [#2327]
22+
- Add support for scalar `text` in `surface` traces [#2327]
23+
- Make mode bar for graphs with multiple subplot types more usable [#2339]
24+
- Add `npm@5` package-lock file [#2323]
25+
26+
### Changed
27+
- All of gl-vis dependencies now use `gl-shader@4.2.1` [#2293, #2306]
28+
- All our dependencies and source now use `glslify@6.1.0` [#2326]
29+
30+
### Fixed
31+
- Prevent page scroll on mobile device on `gl2d` and `gl3d` subplots [#2296]
32+
- Fix multi-marker `scattergl` selection errors (bug introduced in `1.33.0`) [#2295]
33+
- Fix `Plotly.addTraces` in `scattergl` selection call backs (bug introduced in `1.33.0`) [#2298]
34+
- Fix trace `opacity` restyle for `scattergl` traces (bug introduced in `1.33.0`) [#2299]
35+
- Fix `scattergl` handling of `selectedpoints` across multiple traces [#2311]
36+
- Fix `scattergl` horizontal and vertical line rendering [#2340]
37+
- Fix restyle for scalar `hoverinfo` for `scatter3d`, `surface` and `mesh3d` traces [#2327]
38+
- Fix `table` when content-less cells and headers are supplied [#2314]
39+
- Fix `Plotly.animate` for attribute nested in `dimensions` containers [#2324]
40+
- Fix `hoverformat` on `visible: false` cartesian axes (bug introduced in `1.33.0`) [#2329]
41+
- Fix handling of double negative translate transform values [#2339]
42+
- Fix compare `hovermode` fallback for non-cartesian subplot types [#2339]
43+
- Fix animation error messages when overriding and ignoring frames updates [#2313]
44+
45+
1346
## [1.33.1] -- 2018-01-24
1447

1548
### Fixed

CONTRIBUTING.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,24 @@ We use the following [labels](https://github.com/plotly/plotly.js/labels) to tra
2424
| `type: community` | issue left open for community input and pull requests |
2525
| `type: duplicate` | *self-explanatory* |
2626
| `type: wontfix` | *self-explanatory* |
27-
| `status: discussion needed` | Issue or PR that required discussion among maintaners before moving forward |
28-
| `status: in progress` | PRs that required some intial feedback but not ready to merge |
27+
| `status: discussion needed` | Issue or PR that required discussion among maintainers before moving forward |
28+
| `status: in progress` | PRs that required some initial feedback but not ready to merge |
2929
| `status: reviewable` | PRs that are completed from the author's perspective |
3030
| `status: on hold` | PRs that are put on hold |
3131

3232
## Development
3333

34-
#### Perequisites
34+
#### Prerequisites
3535

3636
- git
37-
- [node.js](https://nodejs.org/en/). We recommend using node.js v6.x or v4.x (both LTS).
38-
Upgrading and managing node versions can be easily done using
39-
[`nvm`](https://github.com/creationix/nvm) or its Windows alternatives.
37+
- [node.js](https://nodejs.org/en/). We recommend using node.js v8.x, but all
38+
versions starting from v4 should work. Upgrading and managing node versions
39+
can be easily done using [`nvm`](https://github.com/creationix/nvm) or its
40+
Windows alternatives.
41+
- [`npm`](https://www.npmjs.com/) v5.x and up (which ships by default with
42+
node.js v8.x) to ensure that the
43+
[`package-lock.json`](https://docs.npmjs.com/files/package-lock.json) file is
44+
used and updated correctly.
4045

4146
#### Step 1: Clone the plotly.js repo and install its dependencies
4247

devtools/test_dashboard/devtools.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ function searchMocks(e) {
202202

203203
results.forEach(function(r) {
204204
var result = document.createElement('span');
205-
result.className = 'search-result';
205+
result.className = getResultClass(r.name);
206206
result.innerText = r.name;
207207

208208
result.addEventListener('click', function() {
@@ -212,6 +212,10 @@ function searchMocks(e) {
212212
// Clear plots and plot selected.
213213
Tabs.purge();
214214
Tabs.plotMock(mockName);
215+
216+
mocksList.querySelectorAll('span').forEach(function(el) {
217+
el.className = getResultClass(el.innerText);
218+
});
215219
});
216220

217221
mocksList.appendChild(result);
@@ -222,8 +226,16 @@ function searchMocks(e) {
222226
});
223227
}
224228

229+
function getNameFromHash() {
230+
return window.location.hash.replace(/^#/, '');
231+
}
232+
233+
function getResultClass(name) {
234+
return 'search-result' + (getNameFromHash() === name ? ' search-result__selected' : '');
235+
}
236+
225237
function plotFromHash() {
226-
var initialMock = window.location.hash.replace(/^#/, '');
238+
var initialMock = getNameFromHash();
227239

228240
if(initialMock.length > 0) {
229241
Tabs.plotMock(initialMock);

devtools/test_dashboard/style.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ header span{
5656
color: #fff;
5757
background-color: #4983EC;
5858
}
59+
.search-result__selected{
60+
background-color: #DDDDEE;
61+
}
5962
#plots{
6063
overflow: scroll;
6164
}

0 commit comments

Comments
 (0)