Skip to content

Commit 44be920

Browse files
authored
Merge branch 'dev' into close-on-select
2 parents b08724f + 90bb137 commit 44be920

File tree

233 files changed

+10710
-10020
lines changed

Some content is hidden

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

233 files changed

+10710
-10020
lines changed

.circleci/config.yml

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -227,24 +227,6 @@ jobs:
227227
- store_artifacts:
228228
path: /tmp/dash_artifacts
229229

230-
test-312-react-18:
231-
<<: *test
232-
docker:
233-
- image: cimg/python:3.12.1-browsers
234-
auth:
235-
username: dashautomation
236-
password: $DASH_PAT_DOCKERHUB
237-
environment:
238-
PERCY_ENABLE: 0
239-
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: True
240-
PYVERSION: python312
241-
REDIS_URL: redis://localhost:6379
242-
REACT_VERSION: "18.2.0"
243-
- image: cimg/redis:6.2.6
244-
auth:
245-
username: dashautomation
246-
password: $DASH_PAT_DOCKERHUB
247-
248230
test-38:
249231
<<: *test
250232
docker:
@@ -349,18 +331,6 @@ jobs:
349331
- store_artifacts:
350332
path: /tmp/dash_artifacts
351333

352-
dcc-312-react-18:
353-
<<: *dcc-test
354-
docker:
355-
- image: cimg/python:3.12.1-browsers
356-
auth:
357-
username: dashautomation
358-
password: $DASH_PAT_DOCKERHUB
359-
environment:
360-
PYVERSION: python312
361-
PERCY_ENABLE: 0
362-
REACT_VERSION: "18.2.0"
363-
364334
dcc-38:
365335
<<: *dcc-test
366336
docker:
@@ -430,18 +400,6 @@ jobs:
430400
- store_artifacts:
431401
path: /tmp/dash_artifacts
432402

433-
html-312-react-18:
434-
<<: *html-test
435-
docker:
436-
- image: cimg/python:3.12.1-browsers
437-
auth:
438-
username: dashautomation
439-
password: $DASH_PAT_DOCKERHUB
440-
environment:
441-
PYVERSION: python312
442-
PERCY_ENABLE: 0
443-
REACT_VERSION: "18.2.0"
444-
445403
html-38:
446404
<<: *html-test
447405
docker:
@@ -506,15 +464,6 @@ jobs:
506464
- store_artifacts:
507465
path: /tmp/dash_artifacts
508466

509-
table-server-react-18:
510-
<<: *table-server
511-
docker:
512-
- image: cimg/python:3.12.1-browsers
513-
environment:
514-
PYVERSION: python312
515-
PERCY_ENABLE: 0
516-
REACT_VERSION: "18.2.0"
517-
518467
table-unit-test:
519468
working_directory: ~/dash
520469
docker:
@@ -655,9 +604,6 @@ workflows:
655604
- test-312:
656605
requires:
657606
- install-dependencies-312
658-
- test-312-react-18:
659-
requires:
660-
- install-dependencies-312
661607
- test-38:
662608
requires:
663609
- install-dependencies-38
@@ -672,19 +618,13 @@ workflows:
672618
- dcc-312:
673619
requires:
674620
- install-dependencies-312
675-
- dcc-312-react-18:
676-
requires:
677-
- install-dependencies-312
678621
- dcc-38:
679622
requires:
680623
- install-dependencies-38
681624

682625
- html-312:
683626
requires:
684627
- install-dependencies-312
685-
- html-312-react-18:
686-
requires:
687-
- install-dependencies-312
688628
- html-38:
689629
requires:
690630
- install-dependencies-38
@@ -699,9 +639,6 @@ workflows:
699639
- table-server:
700640
requires:
701641
- install-dependencies-312
702-
- table-server-react-18:
703-
requires:
704-
- install-dependencies-312
705642

706643
- percy/finalize_all:
707644
requires:

.pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ disable=fixme,
7575
unnecessary-lambda-assignment,
7676
broad-exception-raised,
7777
consider-using-generator,
78+
too-many-ancestors
7879

7980

8081
# Enable the message, report, category or checker with the given id(s). You can

@plotly/dash-generator-test-component-nested/src/components/MyNestedComponent.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react';
44
/**
55
* MyNestedComponent description
66
*/
7-
const MyNestedComponent = ({ id, value }) => (<div id={id}>{value}</div>);
7+
const MyNestedComponent = ({ id, value = '' }) => (<div id={id}>{value}</div>);
88

99
MyNestedComponent.propTypes = {
1010
/**
@@ -18,8 +18,4 @@ MyNestedComponent.propTypes = {
1818
value: PropTypes.string
1919
};
2020

21-
MyNestedComponent.defaultProps = {
22-
value: ''
23-
};
24-
2521
export default MyNestedComponent;

@plotly/dash-generator-test-component-standard/src/components/MyStandardComponent.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react';
44
/**
55
* MyComponent description
66
*/
7-
const MyStandardComponent = ({ id, style, value }) => (<div id={id} style={style}>{value}</div>);
7+
const MyStandardComponent = ({ id, style, value = '' }) => (<div id={id} style={style}>{value}</div>);
88

99
MyStandardComponent.propTypes = {
1010
/**
@@ -23,8 +23,4 @@ MyStandardComponent.propTypes = {
2323
value: PropTypes.string
2424
};
2525

26-
MyStandardComponent.defaultProps = {
27-
value: ''
28-
};
29-
30-
export default MyStandardComponent;
26+
export default MyStandardComponent;

@plotly/dash-generator-test-component-typescript/base/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@
1616
dict(
1717
relative_package_path='dash_generator_test_component_typescript.js',
1818
namespace='dash_generator_test_component_typescript'
19-
)
19+
),
20+
{
21+
"dev_package_path": "proptypes.js",
22+
"dev_only": True,
23+
"namespace": 'dash_generator_test_component_typescript'
24+
}
2025
]
2126

2227
for _component in __all__:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignore_props = ['ignored_prop']

@plotly/dash-generator-test-component-typescript/generator.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,23 @@ describe('Test Typescript component metadata generation', () => {
271271
);
272272
expect(objectOfComponents).toBe("node");
273273
}
274+
);
275+
276+
test(
277+
'union and literal values', () => {
278+
const propType = R.path(
279+
propPath('TypeScriptComponent', 'union_enum').concat(
280+
'type'
281+
),
282+
metadata
283+
);
284+
expect(propType.name).toBe('union');
285+
expect(propType.value.length).toBe(3);
286+
expect(propType.value[0].name).toBe('number');
287+
expect(propType.value[1].name).toBe('literal');
288+
expect(propType.value[2].name).toBe('literal');
289+
expect(propType.value[1].value).toBe('small');
290+
}
274291
)
275292
});
276293

@plotly/dash-generator-test-component-typescript/src/props.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export type TypescriptComponentProps = {
2525
array_obj?: {a: string}[];
2626
array_any?: any[];
2727
enum_string?: 'one' | 'two';
28+
enum_number?: 2 | 3 | 4 | 5 | 6;
2829
union?: number | string;
2930
union_shape?: {a: string} | string;
3031
array_union_shape?: ({a: string} | string)[];
@@ -46,6 +47,8 @@ export type TypescriptComponentProps = {
4647

4748
object_of_string?: {[k: string]: string};
4849
object_of_components?: {[k: string]: JSX.Element};
50+
ignored_prop?: {ignore: {me: string}};
51+
union_enum?: number | 'small' | 'large'
4952
};
5053

5154
export type WrappedHTMLProps = {

@plotly/dash-test-components/src/components/AddPropsComponent.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ const AddPropsComponent = (props) => {
77

88
return (
99
<div id={id}>
10-
{React.cloneElement(children, {
10+
{React.cloneElement(children, {
1111
receive: `Element #${id} pass`,
12-
id: id,
1312
})}
1413
</div>
1514
);

0 commit comments

Comments
 (0)