diff --git a/vizro-core/changelog.d/20240523_085359_amward_update_dcc_loading.md b/vizro-core/changelog.d/20240523_085359_amward_update_dcc_loading.md new file mode 100644 index 000000000..f1f65e73c --- /dev/null +++ b/vizro-core/changelog.d/20240523_085359_amward_update_dcc_loading.md @@ -0,0 +1,48 @@ + + + + + + + + + diff --git a/vizro-core/hatch.toml b/vizro-core/hatch.toml index ada814d3e..20267dcd6 100644 --- a/vizro-core/hatch.toml +++ b/vizro-core/hatch.toml @@ -88,7 +88,7 @@ scripts = {lint = "SKIP=gitleaks pre-commit run {args:--all-files}"} [envs.lower-bounds] extra-dependencies = [ "pydantic==1.10.13", - "dash==2.14.1" + "dash==2.17.0" ] [publish.index] diff --git a/vizro-core/pyproject.toml b/vizro-core/pyproject.toml index 07facb94b..24a31da4d 100644 --- a/vizro-core/pyproject.toml +++ b/vizro-core/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ ] dependencies = [ # Temporarily set an upper limit on dash: https://github.com/plotly/dash/issues/2778 - "dash>=2.14.1, !=2.16.0", # 2.14.1 needed for compatibility with werkzeug + "dash>=2.17.0", # 2.17.0 needed for new features on loading spinner "dash_bootstrap_components", "dash-ag-grid>=31.0.0", "pandas", diff --git a/vizro-core/snyk/requirements.txt b/vizro-core/snyk/requirements.txt index e2a2fdc07..f302ba00c 100644 --- a/vizro-core/snyk/requirements.txt +++ b/vizro-core/snyk/requirements.txt @@ -1,4 +1,4 @@ -dash>=2.14.1, !=2.16.0 +dash>=2.17.0 dash_bootstrap_components dash-ag-grid>=31.0.0 pandas diff --git a/vizro-core/src/vizro/models/_components/ag_grid.py b/vizro-core/src/vizro/models/_components/ag_grid.py index 604850c86..d9849f900 100644 --- a/vizro-core/src/vizro/models/_components/ag_grid.py +++ b/vizro-core/src/vizro/models/_components/ag_grid.py @@ -117,4 +117,5 @@ def build(self): ], color="grey", parent_className="loading-container", + overlay_style={"visibility": "visible", "opacity": 0.3}, ) diff --git a/vizro-core/src/vizro/models/_components/graph.py b/vizro-core/src/vizro/models/_components/graph.py index 126944e9a..687e398a2 100644 --- a/vizro-core/src/vizro/models/_components/graph.py +++ b/vizro-core/src/vizro/models/_components/graph.py @@ -136,6 +136,7 @@ def build(self): ), color="grey", parent_className="loading-container", + overlay_style={"visibility": "visible", "opacity": 0.3}, ) @staticmethod diff --git a/vizro-core/src/vizro/models/_components/table.py b/vizro-core/src/vizro/models/_components/table.py index 4dec78de2..81007c1fd 100644 --- a/vizro-core/src/vizro/models/_components/table.py +++ b/vizro-core/src/vizro/models/_components/table.py @@ -117,4 +117,5 @@ def build(self): ), color="grey", parent_className="loading-container", + overlay_style={"visibility": "visible", "opacity": 0.3}, ) diff --git a/vizro-core/tests/unit/vizro/models/_components/test_ag_grid.py b/vizro-core/tests/unit/vizro/models/_components/test_ag_grid.py index 4a08b35c2..4712e060a 100644 --- a/vizro-core/tests/unit/vizro/models/_components/test_ag_grid.py +++ b/vizro-core/tests/unit/vizro/models/_components/test_ag_grid.py @@ -127,6 +127,7 @@ def test_ag_grid_build_mandatory_only(self, standard_ag_grid, gapminder): ], color="grey", parent_className="loading-container", + overlay_style={"visibility": "visible", "opacity": 0.3}, ) assert_component_equal(ag_grid, expected_ag_grid) @@ -149,6 +150,7 @@ def test_ag_grid_build_with_underlying_id(self, ag_grid_with_id_and_conf, filter ], color="grey", parent_className="loading-container", + overlay_style={"visibility": "visible", "opacity": 0.3}, ) assert_component_equal(ag_grid, expected_ag_grid) diff --git a/vizro-core/tests/unit/vizro/models/_components/test_graph.py b/vizro-core/tests/unit/vizro/models/_components/test_graph.py index d38c24c14..215080f8f 100644 --- a/vizro-core/tests/unit/vizro/models/_components/test_graph.py +++ b/vizro-core/tests/unit/vizro/models/_components/test_graph.py @@ -154,5 +154,6 @@ def test_graph_build(self, standard_px_chart): ), color="grey", parent_className="loading-container", + overlay_style={"visibility": "visible", "opacity": 0.3}, ) assert_component_equal(graph, expected_graph) diff --git a/vizro-core/tests/unit/vizro/models/_components/test_table.py b/vizro-core/tests/unit/vizro/models/_components/test_table.py index 6c140af75..4b69e8be6 100644 --- a/vizro-core/tests/unit/vizro/models/_components/test_table.py +++ b/vizro-core/tests/unit/vizro/models/_components/test_table.py @@ -127,6 +127,7 @@ def test_table_build_mandatory_only(self, standard_dash_table, gapminder): ), color="grey", parent_className="loading-container", + overlay_style={"visibility": "visible", "opacity": 0.3}, ) assert_component_equal(table, expected_table) @@ -146,6 +147,7 @@ def test_table_build_with_underlying_id(self, dash_data_table_with_id, filter_in ), color="grey", parent_className="loading-container", + overlay_style={"visibility": "visible", "opacity": 0.3}, ) assert_component_equal(table, expected_table) diff --git a/vizro-core/tests/unit/vizro/tables/test_dash_ag_grid.py b/vizro-core/tests/unit/vizro/tables/test_dash_ag_grid.py index 90b3b8ed7..7dce3eb2f 100644 --- a/vizro-core/tests/unit/vizro/tables/test_dash_ag_grid.py +++ b/vizro-core/tests/unit/vizro/tables/test_dash_ag_grid.py @@ -81,6 +81,7 @@ def custom_ag_grid(data_frame): ], color="grey", parent_className="loading-container", + overlay_style={"visibility": "visible", "opacity": 0.3}, ) assert_component_equal(custom_grid, expected_grid) @@ -118,6 +119,7 @@ def custom_ag_grid(data_frame): ], color="grey", parent_className="loading-container", + overlay_style={"visibility": "visible", "opacity": 0.3}, ) assert_component_equal(custom_grid, expected_grid) diff --git a/vizro-core/tests/unit/vizro/tables/test_dash_table.py b/vizro-core/tests/unit/vizro/tables/test_dash_table.py index 0e6cbd08c..12119a10f 100644 --- a/vizro-core/tests/unit/vizro/tables/test_dash_table.py +++ b/vizro-core/tests/unit/vizro/tables/test_dash_table.py @@ -89,6 +89,7 @@ def custom_dash_data_table(data_frame): ), color="grey", parent_className="loading-container", + overlay_style={"visibility": "visible", "opacity": 0.3}, ) assert_component_equal(custom_table, expected_table) @@ -132,6 +133,7 @@ def custom_dash_data_table(data_frame): ), color="grey", parent_className="loading-container", + overlay_style={"visibility": "visible", "opacity": 0.3}, ) assert_component_equal(custom_table, expected_table)