Skip to content

Commit b00668e

Browse files
authored
Merge branch 'dev' into fix/wrapper
2 parents 71e70c3 + 9140d3a commit b00668e

File tree

16 files changed

+164
-64
lines changed

16 files changed

+164
-64
lines changed

.circleci/config.yml

Lines changed: 1 addition & 2 deletions
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:

.editorconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ charset = utf-8
1212
indent_style = space
1313
indent_size = 4
1414

15-
# Matches the exact files either package.json or .travis.yml
15+
# Matches the exact files either package.json or .circleci/config.yml
1616
[{package.json,.circleci/config.yml}]
1717
indent_style = space
1818
indent_size = 2
19+

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
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+
- [#3103](https://github.com/plotly/dash/pull/3103) Fix Graph component becomes unresponsive if an invalid figure is passed
11+
512
## [2.18.2] - 2024-11-04
613

714
## Fixed
@@ -89,7 +96,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
8996
## Fixed
9097

9198
- [#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)
99+
- [#2833](https://github.com/plotly/dash/pull/2833) Allow data url in link props. Fixes [#2764](https://github.com/plotly/dash/issues/2764)
93100
- [#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)
94101
- [#2817](https://github.com/plotly/dash/pull/2817) Change hashing algorithm from md5 to sha256, Fixes [#2697](https://github.com/plotly/dash/issues/2697).
95102
- [#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 +123,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
116123
## Added
117124
- [#2762](https://github.com/plotly/dash/pull/2762) Add dynamic loading of component libraries.
118125
- 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.
126+
- Add `preloaded_libraries=[]` to dash init, included libraries names will be loaded on the index like before.
120127
- [#2758](https://github.com/plotly/dash/pull/2758)
121128
- exposing `setProps` to `dash_clientside.clientSide_setProps` to allow for JS code to interact directly with the dash eco-system
122129
- [#2730](https://github.com/plotly/dash/pull/2721) Load script files with `.mjs` ending as js modules

CITATION.cff

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it as below."
3+
authors:
4+
- family-names: "Parmer"
5+
given-names: "Chris"
6+
- family-names: "Duval"
7+
given-names: "Philippe"
8+
- family-names: "Johnson"
9+
given-names: "Alex"
10+
orcid: https://orcid.org/0000-0003-4623-4147
11+
title: "A data and analytics web app framework for Python, no JavaScript required."
12+
version: 2.18.2
13+
doi: 10.5281/zenodo.14182630
14+
date-released: 2024-11-04
15+
url: https://github.com/plotly/dash

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

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/dash-core-components/src/fragments/Graph.react.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ class PlotlyGraph extends Component {
176176
configClone.typesetMath = mathjax;
177177

178178
const figureClone = {
179-
data: figure.data,
180-
layout: this.getLayout(figure.layout, responsive),
181-
frames: figure.frames,
179+
data: figure?.data,
180+
layout: this.getLayout(figure?.layout, responsive),
181+
frames: figure?.frames,
182182
config: configClone,
183183
};
184184

components/dash-core-components/tests/integration/graph/test_graph_basics.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,3 +370,44 @@ def handleClick(clickData):
370370
data = json.loads(data)
371371
assert "customdata" in data["points"][0], "graph clickData must contain customdata"
372372
assert data["points"][0]["customdata"][0] == expected_value
373+
374+
375+
def test_grbs008_graph_with_empty_figure(dash_dcc):
376+
app = Dash(__name__)
377+
app.layout = html.Div(
378+
[
379+
html.Button("Toggle graph", id="btn"),
380+
dcc.Graph(
381+
id="graph",
382+
figure=None,
383+
),
384+
]
385+
)
386+
387+
@app.callback(Output("graph", "figure"), [Input("btn", "n_clicks")])
388+
def toggle_figure(n_clicks):
389+
if int(n_clicks or 0) % 2 == 0:
390+
# a valid figure
391+
return go.Figure([], layout=go.Layout(title="Valid Figure"))
392+
else:
393+
# an invalid figure
394+
return None
395+
396+
dash_dcc.start_server(app)
397+
398+
# Click the toggle button a couple of times and expect the graph to change between the
399+
# valid and invalid figures, using the "title" as the indicator.
400+
dash_dcc.wait_for_element("#graph")
401+
wait.until(
402+
lambda: dash_dcc.find_element(".gtitle").text == "Valid Figure", timeout=2
403+
)
404+
405+
dash_dcc.find_element("#btn").click()
406+
wait.until(lambda: len(dash_dcc.find_elements(".gtitle")) == 0, timeout=2)
407+
408+
dash_dcc.find_element("#btn").click()
409+
wait.until(
410+
lambda: dash_dcc.find_element(".gtitle").text == "Valid Figure", timeout=2
411+
)
412+
413+
assert dash_dcc.get_logs() == []

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

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/dash-html-components/scripts/data/attributes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"elements": [
2121
"form"
2222
],
23-
"description": "List of supported charsets."
23+
"description": "The character set, which if provided must be \"UTF-8\"."
2424
},
2525
"accessKey": {
2626
"elements": [

components/dash-table/package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)