Skip to content

Commit e45095f

Browse files
authored
Merge branch 'dash-3.0' into deprecation-removals
2 parents d026cd9 + a32d03a commit e45095f

File tree

11 files changed

+98
-56
lines changed

11 files changed

+98
-56
lines changed

.circleci/config.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ jobs:
540540
table-visual-test:
541541
working_directory: ~/dash/components/dash-table
542542
docker:
543-
- image: cimg/node:16.13-browsers
543+
- image: cimg/node:lts-browsers
544544
environment:
545545
PERCY_TOKEN: $PERCY_TOKEN_TABLE
546546

@@ -551,7 +551,6 @@ jobs:
551551
- restore_cache:
552552
key: dep-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}
553553
- browser-tools/install-browser-tools:
554-
chrome-version: 120.0.6099.71
555554
install-firefox: false
556555
install-geckodriver: false
557556
- run:

CHANGELOG.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
All notable changes to `dash` will be documented in this file.
33
This project adheres to [Semantic Versioning](https://semver.org/).
44

5+
## [UNRELEASED]
6+
7+
## Fixed
8+
9+
- [#3080](https://github.com/plotly/dash/pull/3080) Fix docstring generation for components using single-line or nonstandard-indent leading comments
10+
511
## [2.18.2] - 2024-11-04
612

713
## Fixed
@@ -89,7 +95,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
8995
## Fixed
9096

9197
- [#2362](https://github.com/plotly/dash/pull/2362) Global namespace not polluted any more when loading clientside callbacks.
92-
- [#2833](https://github.com/plotly/dash/pull/2833) Allow data url in link props. Fixes [#2764](https://github.com/plotly/dash/issues/2764)
98+
- [#2833](https://github.com/plotly/dash/pull/2833) Allow data url in link props. Fixes [#2764](https://github.com/plotly/dash/issues/2764)
9399
- [#2822](https://github.com/plotly/dash/pull/2822) Fix side update (running/progress/cancel) dict ids. Fixes [#2111](https://github.com/plotly/dash/issues/2111)
94100
- [#2817](https://github.com/plotly/dash/pull/2817) Change hashing algorithm from md5 to sha256, Fixes [#2697](https://github.com/plotly/dash/issues/2697).
95101
- [#2816](https://github.com/plotly/dash/pull/2816) Fix dcc.Dropdown value not updated when option is removed. Fixes [#2733](https://github.com/plotly/dash/issues/2733).
@@ -116,7 +122,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
116122
## Added
117123
- [#2762](https://github.com/plotly/dash/pull/2762) Add dynamic loading of component libraries.
118124
- Add `dynamic_loading=True` to dash init.
119-
- Add `preloaded_libraries=[]` to dash init, included libraries names will be loaded on the index like before.
125+
- Add `preloaded_libraries=[]` to dash init, included libraries names will be loaded on the index like before.
120126
- [#2758](https://github.com/plotly/dash/pull/2758)
121127
- exposing `setProps` to `dash_clientside.clientSide_setProps` to allow for JS code to interact directly with the dash eco-system
122128
- [#2730](https://github.com/plotly/dash/pull/2721) Load script files with `.mjs` ending as js modules

components/dash-core-components/package-lock.json

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/dash-html-components/package-lock.json

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/dash-table/package-lock.json

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash/_get_paths.py

+10
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55

66

77
def get_asset_url(path):
8+
"""
9+
Return the URL for the provided `path` in the assets directory.
10+
11+
`dash.get_asset_url` is not compatible with Dash Snapshots.
12+
Use `get_asset_url` on the app instance instead: `app.get_asset_url`.
13+
See `app.get_asset_url` for more information.
14+
"""
815
return app_get_asset_url(CONFIG, path)
916

1017

@@ -59,6 +66,9 @@ def display_content(path):
5966
if page_name == "page-2":
6067
return chapters.page_2
6168
```
69+
70+
`dash.get_relative_path` is not compatible with Dash Snapshots. Use
71+
`get_relative_path` on the app instance instead: `app.get_relative_path`.
6272
"""
6373
return app_get_relative_path(CONFIG.requests_pathname_prefix, path)
6474

dash/dash-renderer/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"postbuild": "es-check es2015 ../deps/*.js build/*.js",
1717
"test": "karma start karma.conf.js --single-run",
1818
"format": "run-s private::format.*",
19-
"lint": "run-s private::lint.*"
19+
"lint": "run-s private::lint.* --continue-on-error"
2020
},
2121
"author": "chriddyp",
2222
"license": "MIT",

dash/dash.py

+27
Original file line numberDiff line numberDiff line change
@@ -1552,6 +1552,33 @@ def _hash(script):
15521552
]
15531553

15541554
def get_asset_url(self, path):
1555+
"""
1556+
Return the URL for the provided `path` in the assets directory.
1557+
1558+
If `assets_external_path` is set, `get_asset_url` returns
1559+
`assets_external_path` + `assets_url_path` + `path`, where
1560+
`path` is the path passed to `get_asset_url`.
1561+
1562+
Otherwise, `get_asset_url` returns
1563+
`requests_pathname_prefix` + `assets_url_path` + `path`, where
1564+
`path` is the path passed to `get_asset_url`.
1565+
1566+
Use `get_asset_url` in an app to access assets at the correct location
1567+
in different environments. In a deployed app on Dash Enterprise,
1568+
`requests_pathname_prefix` is the app name. For an app called "my-app",
1569+
`app.get_asset_url("image.png")` would return:
1570+
1571+
```
1572+
/my-app/assets/image.png
1573+
```
1574+
1575+
While the same app running locally, without
1576+
`requests_pathname_prefix` set, would return:
1577+
1578+
```
1579+
/assets/image.png
1580+
```
1581+
"""
15551582
return _get_paths.app_get_asset_url(self.config, path)
15561583

15571584
def get_relative_path(self, path):

dash/extract-meta.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ function gatherComponents(sources, components = {}) {
728728

729729
if (propsType) {
730730
if (
731-
propsType.valueDeclaration &&
731+
propsType.valueDeclaration &&
732732
propsType.valueDeclaration.name &&
733733
propsType.valueDeclaration.name.elements &&
734734
propsType.valueDeclaration.name.elements.length
@@ -762,7 +762,7 @@ function gatherComponents(sources, components = {}) {
762762
fullText
763763
.slice(r.pos + 4, r.end - 3)
764764
.split('\n')
765-
.map(s => s.slice(3, s.length))
765+
.map(s => s.replace(/^(\s*\*?\s)/, ''))
766766
.filter(e => e)
767767
.join('\n')
768768
)

package-lock.json

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"format": "run-s private::format.*",
3939
"initialize": "run-s private::initialize.*",
4040
"prepare": "husky install",
41-
"lint": "run-s private::lint.*",
41+
"lint": "run-s private::lint.* --continue-on-error",
4242
"setup-tests.py": "run-s private::test.py.deploy-*",
4343
"setup-tests.R": "run-s private::test.R.deploy-*",
4444
"citest.integration": "run-s setup-tests.py private::test.integration-*",

0 commit comments

Comments
 (0)