Skip to content

Commit

Permalink
Merge branch 'dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
T4rk1n authored Dec 11, 2024
2 parents a2fa926 + 35ced08 commit d6ec97c
Show file tree
Hide file tree
Showing 10 changed files with 89 additions and 53 deletions.
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ jobs:
table-visual-test:
working_directory: ~/dash/components/dash-table
docker:
- image: cimg/node:16.13-browsers
- image: cimg/node:lts-browsers
environment:
PERCY_TOKEN: $PERCY_TOKEN_TABLE

Expand All @@ -551,7 +551,6 @@ jobs:
- restore_cache:
key: dep-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}
- browser-tools/install-browser-tools:
chrome-version: 120.0.6099.71
install-firefox: false
install-geckodriver: false
- run:
Expand Down
24 changes: 12 additions & 12 deletions components/dash-core-components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions components/dash-html-components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"elements": [
"form"
],
"description": "List of supported charsets."
"description": "The character set, which if provided must be \"UTF-8\"."
},
"accessKey": {
"elements": [
Expand Down
24 changes: 12 additions & 12 deletions components/dash-table/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions dash/_get_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@


def get_asset_url(path):
"""
Return the URL for the provided `path` in the assets directory.
`dash.get_asset_url` is not compatible with Dash Snapshots.
Use `get_asset_url` on the app instance instead: `app.get_asset_url`.
See `app.get_asset_url` for more information.
"""
return app_get_asset_url(CONFIG, path)


Expand Down Expand Up @@ -59,6 +66,9 @@ def display_content(path):
if page_name == "page-2":
return chapters.page_2
```
`dash.get_relative_path` is not compatible with Dash Snapshots. Use
`get_relative_path` on the app instance instead: `app.get_relative_path`.
"""
return app_get_relative_path(CONFIG.requests_pathname_prefix, path)

Expand Down
2 changes: 1 addition & 1 deletion dash/dash-renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"postbuild": "es-check es2015 ../deps/*.js build/*.js",
"test": "karma start karma.conf.js --single-run",
"format": "run-s private::format.*",
"lint": "run-s private::lint.*"
"lint": "run-s private::lint.* --continue-on-error"
},
"author": "chriddyp",
"license": "MIT",
Expand Down
27 changes: 27 additions & 0 deletions dash/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -1547,6 +1547,33 @@ def _hash(script):
]

def get_asset_url(self, path):
"""
Return the URL for the provided `path` in the assets directory.
If `assets_external_path` is set, `get_asset_url` returns
`assets_external_path` + `assets_url_path` + `path`, where
`path` is the path passed to `get_asset_url`.
Otherwise, `get_asset_url` returns
`requests_pathname_prefix` + `assets_url_path` + `path`, where
`path` is the path passed to `get_asset_url`.
Use `get_asset_url` in an app to access assets at the correct location
in different environments. In a deployed app on Dash Enterprise,
`requests_pathname_prefix` is the app name. For an app called "my-app",
`app.get_asset_url("image.png")` would return:
```
/my-app/assets/image.png
```
While the same app running locally, without
`requests_pathname_prefix` set, would return:
```
/assets/image.png
```
"""
return _get_paths.app_get_asset_url(self.config, path)

def get_relative_path(self, path):
Expand Down
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"format": "run-s private::format.*",
"initialize": "run-s private::initialize.*",
"prepare": "husky install",
"lint": "run-s private::lint.*",
"lint": "run-s private::lint.* --continue-on-error",
"setup-tests.py": "run-s private::test.py.deploy-*",
"setup-tests.R": "run-s private::test.R.deploy-*",
"citest.integration": "run-s setup-tests.py private::test.integration-*",
Expand Down

0 comments on commit d6ec97c

Please sign in to comment.