Skip to content

Commit 3c5bd45

Browse files
authored
Merge branch 'plotly:dev' into expose-setprops
2 parents 7eb975d + 6051319 commit 3c5bd45

File tree

11 files changed

+52
-29
lines changed

11 files changed

+52
-29
lines changed

.circleci/config.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ orbs:
55
percy: percy/[email protected]
66
browser-tools: circleci/[email protected]
77

8+
89
jobs:
910
artifacts:
1011
docker:
@@ -107,7 +108,7 @@ jobs:
107108
- restore_cache:
108109
key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-all.txt" }}
109110
- browser-tools/install-browser-tools:
110-
chrome-version: 116.0.5845.110
111+
chrome-version: 120.0.6099.71
111112
- run:
112113
name: ️️🏗️ pip dev requirements
113114
command: |
@@ -198,7 +199,7 @@ jobs:
198199
- restore_cache:
199200
key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-all.txt" }}
200201
- browser-tools/install-browser-tools:
201-
chrome-version: 116.0.5845.110
202+
chrome-version: 120.0.6099.71
202203
install-firefox: false
203204
install-geckodriver: false
204205
- attach_workspace:
@@ -315,7 +316,7 @@ jobs:
315316
- restore_cache:
316317
key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-all.txt" }}
317318
- browser-tools/install-browser-tools:
318-
chrome-version: 116.0.5845.110
319+
chrome-version: 120.0.6099.71
319320
install-firefox: false
320321
install-geckodriver: false
321322
- attach_workspace:
@@ -386,7 +387,7 @@ jobs:
386387
- restore_cache:
387388
key: html-{{ checksum "components/dash-html-components/package.json" }}-{{ checksum "components/dash-html-components/package-lock.json" }}
388389
- browser-tools/install-browser-tools:
389-
chrome-version: 116.0.5845.110
390+
chrome-version: 120.0.6099.71
390391
install-firefox: false
391392
install-geckodriver: false
392393
- attach_workspace:
@@ -460,7 +461,7 @@ jobs:
460461
- restore_cache:
461462
key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-all.txt" }}
462463
- browser-tools/install-browser-tools:
463-
chrome-version: 116.0.5845.110
464+
chrome-version: 120.0.6099.71
464465
install-firefox: false
465466
install-geckodriver: false
466467
- attach_workspace:
@@ -516,7 +517,7 @@ jobs:
516517
- restore_cache:
517518
key: table-{{ checksum "components/dash-table/package.json" }}-{{ checksum "components/dash-table/package-lock.json" }}
518519
- browser-tools/install-browser-tools:
519-
chrome-version: 116.0.5845.110
520+
chrome-version: 120.0.6099.71
520521
install-firefox: false
521522
install-geckodriver: false
522523
- attach_workspace:
@@ -554,7 +555,7 @@ jobs:
554555
- restore_cache:
555556
key: dep-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}
556557
- browser-tools/install-browser-tools:
557-
chrome-version: 116.0.5845.110
558+
chrome-version: 120.0.6099.71
558559
install-firefox: false
559560
install-geckodriver: false
560561
- run:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](https://semver.org/).
44

55
## [UNRELEASED]
66

7+
## Fixed
8+
9+
- [#2756](https://github.com/plotly/dash/pull/2756) Prevent false dangerous link warning. Fixes [#2743](https://github.com/plotly/dash/issues/2743)
10+
711
## Changed
812

913
- [#2734](https://github.com/plotly/dash/pull/2734) Configure CI for Python 3.10 [#1863](https://github.com/plotly/dash/issues/1863)

components/dash-core-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"private::lint.eslint": "eslint src",
2020
"private::lint.flake8": "flake8 --exclude=dash_core_components,node_modules,venv",
2121
"private::lint.prettier": "prettier --config .prettierrc src/**/*.js --list-different",
22-
"prepublishOnly": "rimraf -rf lib && babel src --out-dir lib --copy-files --config-file ./.lib.babelrc && rimraf --glob -rf lib/jl/ lib/*.jl",
22+
"prepublishOnly": "rimraf lib && babel src --out-dir lib --copy-files --config-file ./.lib.babelrc && rimraf --glob lib/jl/ lib/*.jl",
2323
"test": "run-s -c lint test:intg test:pyimport",
2424
"test:intg": "pytest --nopercyfinalize --headless tests/integration ",
2525
"test:pyimport": "python -m unittest tests/test_dash_import.py",

components/dash-core-components/src/components/Link.react.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ const Link = props => {
4646
refresh,
4747
setProps,
4848
} = props;
49-
const sanitizedUrl = useMemo(() => sanitizeUrl(href), [href]);
49+
const sanitizedUrl = useMemo(() => {
50+
return href ? sanitizeUrl(href) : undefined;
51+
}, [href]);
5052

5153
const updateLocation = e => {
5254
const hasModifiers = e.metaKey || e.shiftKey || e.altKey || e.ctrlKey;
@@ -70,7 +72,7 @@ const Link = props => {
7072
};
7173

7274
useEffect(() => {
73-
if (sanitizedUrl !== href) {
75+
if (sanitizedUrl && sanitizedUrl !== href) {
7476
setProps({
7577
_dash_error: new Error(`Dangerous link detected:: ${href}`),
7678
});

components/dash-html-components/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ See the [contributing guide](CONTRIBUTING.md) for guidelines on contributing to
100100
```
101101
2. Cleanup the dist folder (optional)
102102
```
103-
$ rimraf -rf dist
103+
$ rimraf dist
104104
```
105105
3. Publish on NPM (Optional if chosen False in `publish_on_npm`)
106106
```

components/dash-html-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"homepage": "https://github.com/plotly/dash",
1515
"scripts": {
16-
"clean": "rimraf --glob -rf ./src/* && mkdirp ./src/components",
16+
"clean": "rimraf --glob ./src/* && mkdirp ./src/components",
1717
"prebuild": "cd scripts && sh generate-all.sh && cd ../../",
1818
"extract": "cd scripts && sh extract-all.sh",
1919
"lint": "eslint src scripts",

dash/_validate.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,11 @@ def validate_index(name, checks, index):
392392
def validate_layout_type(value):
393393
if not isinstance(value, (Component, patch_collections_abc("Callable"))):
394394
raise exceptions.NoLayoutException(
395-
"Layout must be a dash component "
396-
"or a function that returns a dash component."
395+
"""
396+
Layout must be a single dash component
397+
or a function that returns a dash component.
398+
Cannot be a tuple (are there any trailing commas?)
399+
"""
397400
)
398401

399402

dash/dash-renderer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "render dash components in react",
55
"main": "build/dash_renderer.min.js",
66
"scripts": {
7-
"prepublishOnly": "rimraf -rf lib && babel src --extensions=\".ts,.tsx,.js,.jsx\" --out-dir lib --copy-files",
7+
"prepublishOnly": "rimraf lib && babel src --extensions=\".ts,.tsx,.js,.jsx\" --out-dir lib --copy-files",
88
"private::format.eslint": "eslint --quiet --fix src tests",
99
"private::format.prettier": "prettier --write \"{src,tests}/**/*.{js,jsx,ts,tsx}\"",
1010
"private::lint.eslint": "eslint src tests",

dash/dash-renderer/src/utils/TreeContainer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ export function validateComponent(componentDefinition: any) {
6161
if (type(componentDefinition) === 'Array') {
6262
throw new Error(
6363
'The children property of a component is a list of lists, instead ' +
64-
'of just a list. ' +
65-
'Check the component that has the following contents, ' +
64+
'of just a list. This can sometimes be due to a trailing comma. ' +
65+
'Check the component that has the following contents ' +
6666
'and remove one of the levels of nesting: \n' +
6767
JSON.stringify(componentDefinition, null, 2)
6868
);

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@
1616
"private::lint.pylint-dash": "PYLINTRC=${PYLINTRC:=.pylintrc312} && pylint dash setup.py --rcfile=$PYLINTRC",
1717
"private::lint.pylint-tests": "PYLINTRC=${PYLINTRC:=.pylintrc312} && pylint tests/unit tests/integration -d all -e C0410,C0413,W0109 --rcfile=$PYLINTRC",
1818
"private::lint.renderer": "cd dash/dash-renderer && npm run lint",
19-
"private::test.setup-components": "cd \\@plotly/dash-test-components && npm ci && npm run build",
20-
"private::test.setup-nested": "cd \\@plotly/dash-generator-test-component-nested && npm ci && npm run build",
21-
"private::test.setup-standard": "cd \\@plotly/dash-generator-test-component-standard && npm ci && npm run build",
22-
"private::test.setup-typescript": "cd \\@plotly/dash-generator-test-component-typescript && npm ci && npm run build",
23-
"private::test.py.deploy-components": "npm run private::test.setup-components && cd \\@plotly/dash-test-components && pip install -e .",
24-
"private::test.py.deploy-nested": "npm run private::test.setup-nested && cd \\@plotly/dash-generator-test-component-nested && pip install -e .",
25-
"private::test.py.deploy-standard": "npm run private::test.setup-standard && cd \\@plotly/dash-generator-test-component-standard && pip install -e .",
26-
"private::test.py.deploy-typescript": "npm run private::test.setup-typescript && cd \\@plotly/dash-generator-test-component-typescript && pip install -e .",
27-
"private::test.R.deploy-components": "npm run private::test.setup-components && cd \\@plotly/dash-test-components && sudo R CMD INSTALL .",
28-
"private::test.R.deploy-nested": "npm run private::test.setup-nested && cd \\@plotly/dash-generator-test-component-nested && sudo R CMD INSTALL .",
29-
"private::test.R.deploy-standard": "npm run private::test.setup-standard && cd \\@plotly/dash-generator-test-component-standard && sudo R CMD INSTALL .",
19+
"private::test.setup-components": "cd @plotly/dash-test-components && npm ci && npm run build",
20+
"private::test.setup-nested": "cd @plotly/dash-generator-test-component-nested && npm ci && npm run build",
21+
"private::test.setup-standard": "cd @plotly/dash-generator-test-component-standard && npm ci && npm run build",
22+
"private::test.setup-typescript": "cd @plotly/dash-generator-test-component-typescript && npm ci && npm run build",
23+
"private::test.py.deploy-components": "npm run private::test.setup-components && cd @plotly/dash-test-components && pip install -e .",
24+
"private::test.py.deploy-nested": "npm run private::test.setup-nested && cd @plotly/dash-generator-test-component-nested && pip install -e .",
25+
"private::test.py.deploy-standard": "npm run private::test.setup-standard && cd @plotly/dash-generator-test-component-standard && pip install -e .",
26+
"private::test.py.deploy-typescript": "npm run private::test.setup-typescript && cd @plotly/dash-generator-test-component-typescript && pip install -e .",
27+
"private::test.R.deploy-components": "npm run private::test.setup-components && cd @plotly/dash-test-components && sudo R CMD INSTALL .",
28+
"private::test.R.deploy-nested": "npm run private::test.setup-nested && cd @plotly/dash-generator-test-component-nested && sudo R CMD INSTALL .",
29+
"private::test.R.deploy-standard": "npm run private::test.setup-standard && cd @plotly/dash-generator-test-component-standard && sudo R CMD INSTALL .",
3030
"private::test.unit-dash": "pytest tests/unit",
3131
"private::test.unit-renderer": "cd dash/dash-renderer && npm run test",
32-
"private::test.unit-generation": "cd \\@plotly/dash-generator-test-component-typescript && npm ci && npm test",
32+
"private::test.unit-generation": "cd @plotly/dash-generator-test-component-typescript && npm ci && npm test",
3333
"private::test.integration-dash": "TESTFILES=$(circleci tests glob \"tests/integration/**/test_*.py\" | circleci tests split --split-by=timings) && pytest --headless --nopercyfinalize --junitxml=test-reports/junit_intg.xml ${TESTFILES}",
3434
"private::test.integration-dash-import": "cd tests/integration/dash && python dash_import_test.py",
3535
"cibuild": "run-s private::cibuild.*",

0 commit comments

Comments
 (0)