Skip to content

Commit 69d6060

Browse files
committed
Merge remote-tracking branch 'origin/master' into clickable-legend-group-titles
2 parents c8ebcde + d17ddc1 commit 69d6060

19 files changed

+199
-181
lines changed

.circleci/download_google_fonts.py

-9
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,6 @@ def download(repo, family, types) :
1010
req = requests.get(url, allow_redirects=True)
1111
open(dirOut + name, 'wb').write(req.content)
1212

13-
download(
14-
'https://github.com/eliheuer/dosis-vf/blob/master/fonts/static-fonts/',
15-
'Dosis',
16-
[
17-
'-Regular',
18-
'-Bold'
19-
]
20-
)
21-
2213
download(
2314
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSansMono/',
2415
'NotoSansMono',

CONTRIBUTING.md

+19-7
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,33 @@ We use the following [labels](https://github.com/plotly/plotly.js/labels) to tra
8484
[`package-lock.json`](https://docs.npmjs.com/files/package-lock.json) file is
8585
used and updated correctly.
8686

87-
#### Step 1: Clone the plotly.js repo and install its dependencies
87+
#### Step 1: Fork the plotly.js repository, clone your fork and step into it
8888

8989
```bash
90-
git clone https://github.com/plotly/plotly.js.git
90+
git clone --depth 1 git@github.com:<your-GitHub-username>/plotly.js.git
9191
cd plotly.js
92+
```
93+
94+
#### Step 2: Switch to a dev branch
95+
96+
```bash
97+
# please do not use master or main for your dev branch
98+
git checkout dev-branch-name
99+
```
100+
101+
#### Step 3: Install dependencies
102+
103+
```bash
92104
npm install
93105
```
94106

95-
#### Step 2: Setup test environment
107+
#### Step 4: Setup test environment
96108

97109
```bash
98110
npm run pretest
99111
```
100112

101-
#### Step 3: Start the test dashboard
113+
#### Step 5: Start the test dashboard
102114

103115
```bash
104116
npm start
@@ -110,7 +122,7 @@ This command bundles up the source files with source maps using
110122
dev plotly.js bundle update every time a source file is saved) and opens up a
111123
tab in your browser.
112124

113-
#### Step 4: Open up the console and start developing
125+
#### Step 6: Open up the console and start developing
114126

115127
A typical workflow is to make some modifications to the source, update the
116128
test dashboard, inspect and debug the changes, then repeat. The test dashboard
@@ -138,13 +150,13 @@ Three additional helpers exist that are refreshed every second:
138150
There is also a search bar in the top right of the dashboard. This fuzzy-searches
139151
image mocks based on their file name and trace type.
140152

141-
#### Step 5: Regenerate plot-schema in "test" folder then review & commit potential changes
153+
#### Step 7: Regenerate plot-schema in "test" folder then review & commit potential changes
142154

143155
```bash
144156
npm run schema
145157
```
146158

147-
#### Step 6: Review & commit potential changes made to test/plot-schema.json
159+
#### Step 8: Review & commit potential changes made to test/plot-schema.json
148160

149161
> If you are editing attribute descriptions or implementing a new feature this file located in the test folder records the proposed changes to the API. Note that there is another plot-schema.json file located in the dist folder, which should only be updated by the maintainers at release time.
150162

draftlogs/5791_change.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Adjust CONTRIBUTING document on how to clone plotly.js and submit pull requests from your fork [[#5791](https://github.com/plotly/plotly.js/pull/5791)]

draftlogs/5813_change.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Sort object key values in schema [[#5813](https://github.com/plotly/plotly.js/pull/5813)]

src/components/calendars/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var ONEDAY = constants.ONEDAY;
1010

1111
var attributes = {
1212
valType: 'enumerated',
13-
values: Object.keys(calendars.calendars),
13+
values: Lib.sortObjectKeys(calendars.calendars),
1414
editType: 'calc',
1515
dflt: 'gregorian'
1616
};

src/components/colorscale/attributes.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
var colorbarAttrs = require('../colorbar/attributes');
44
var counterRegex = require('../../lib/regex').counter;
5+
var sortObjectKeys = require('../../lib/sort_object_keys');
56

67
var palettes = require('./scales.js').scales;
7-
var paletteStr = Object.keys(palettes);
8+
var paletteStr = sortObjectKeys(palettes);
89

910
function code(s) {
1011
return '`' + s + '`';

src/lib/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ lib.roundUp = searchModule.roundUp;
6767
lib.sort = searchModule.sort;
6868
lib.findIndexOfMin = searchModule.findIndexOfMin;
6969

70+
lib.sortObjectKeys = require('./sort_object_keys');
71+
7072
var statsModule = require('./stats');
7173
lib.aggNums = statsModule.aggNums;
7274
lib.len = statsModule.len;

src/lib/sort_object_keys.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
module.exports = function sortObjectKeys(obj) {
4+
return Object.keys(obj).sort();
5+
};

src/plots/geo/layout_attributes.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ var colorAttrs = require('../../components/color/attributes');
44
var domainAttrs = require('../domain').attributes;
55
var constants = require('./constants');
66
var overrideAll = require('../../plot_api/edit_types').overrideAll;
7+
var sortObjectKeys = require('../../lib/sort_object_keys');
78

89
var geoAxesAttrs = {
910
range: {
@@ -100,14 +101,14 @@ var attrs = module.exports = overrideAll({
100101
},
101102
scope: {
102103
valType: 'enumerated',
103-
values: Object.keys(constants.scopeDefaults),
104+
values: sortObjectKeys(constants.scopeDefaults),
104105
dflt: 'world',
105106
description: 'Set the scope of the map.'
106107
},
107108
projection: {
108109
type: {
109110
valType: 'enumerated',
110-
values: Object.keys(constants.projNames),
111+
values: sortObjectKeys(constants.projNames),
111112
description: 'Sets the projection type.'
112113
},
113114
rotation: {

src/plots/mapbox/constants.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict';
22

3+
var sortObjectKeys = require('../../lib/sort_object_keys');
4+
35
var requiredVersion = '1.10.1';
46

57
var OSM = '© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';
@@ -156,7 +158,7 @@ var stylesNonMapbox = {
156158
}
157159
};
158160

159-
var styleValuesNonMapbox = Object.keys(stylesNonMapbox);
161+
var styleValuesNonMapbox = sortObjectKeys(stylesNonMapbox);
160162

161163
module.exports = {
162164
requiredVersion: requiredVersion,

src/traces/scatter3d/attributes.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ var DASHES = require('../../constants/gl3d_dashes');
1111
var MARKER_SYMBOLS = require('../../constants/gl3d_markers');
1212
var extendFlat = require('../../lib/extend').extendFlat;
1313
var overrideAll = require('../../plot_api/edit_types').overrideAll;
14+
var sortObjectKeys = require('../../lib/sort_object_keys');
1415

1516
var scatterLineAttrs = scatterAttrs.line;
1617
var scatterMarkerAttrs = scatterAttrs.marker;
@@ -20,7 +21,7 @@ var lineAttrs = extendFlat({
2021
width: scatterLineAttrs.width,
2122
dash: {
2223
valType: 'enumerated',
23-
values: Object.keys(DASHES),
24+
values: sortObjectKeys(DASHES),
2425
dflt: 'solid',
2526
description: 'Sets the dash style of the lines.'
2627
}
@@ -122,7 +123,7 @@ var attrs = module.exports = overrideAll({
122123
marker: extendFlat({ // Parity with scatter.js?
123124
symbol: {
124125
valType: 'enumerated',
125-
values: Object.keys(MARKER_SYMBOLS),
126+
values: sortObjectKeys(MARKER_SYMBOLS),
126127
dflt: 'circle',
127128
arrayOk: true,
128129
description: 'Sets the marker symbol type.'

src/traces/scattergl/attributes.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ var scatterAttrs = require('../scatter/attributes');
55
var axisHoverFormat = require('../../plots/cartesian/axis_format_attributes').axisHoverFormat;
66
var colorScaleAttrs = require('../../components/colorscale/attributes');
77

8+
var sortObjectKeys = require('../../lib/sort_object_keys');
89
var extendFlat = require('../../lib/extend').extendFlat;
910
var overrideAll = require('../../plot_api/edit_types').overrideAll;
1011
var DASHES = require('./constants').DASHES;
@@ -59,7 +60,7 @@ var attrs = module.exports = overrideAll({
5960
},
6061
dash: {
6162
valType: 'enumerated',
62-
values: Object.keys(DASHES),
63+
values: sortObjectKeys(DASHES),
6364
dflt: 'solid',
6465
description: 'Sets the style of the lines.'
6566
}
536 Bytes
Loading
2.03 KB
Loading
187 Bytes
Loading

test/image/mocks/gl3d_indicator_scatter3d.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"font": {
3232
"color": "white",
33-
"family": "Dosis"
33+
"family": "Raleway"
3434
},
3535
"paper_bgcolor": "black",
3636
"margin": {

test/image/mocks/indicator_bignumber.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"paper_bgcolor": "black",
110110
"font": {
111111
"color": "white",
112-
"family": "Dosis"
112+
"family": "Raleway"
113113
},
114114
"margin": {
115115
"t": 25,

test/image/mocks/indicator_scatter.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"font": {
3535
"color": "white",
36-
"family": "Dosis"
36+
"family": "Raleway"
3737
},
3838
"paper_bgcolor": "black",
3939
"plot_bgcolor": "black",

0 commit comments

Comments
 (0)