From cf0b5ce705670b80827ae458dac32f6212353642 Mon Sep 17 00:00:00 2001 From: rmanaem Date: Thu, 6 Jun 2024 14:49:51 -0400 Subject: [PATCH] Implemented loading overlay for domain tabs --- climate_emotions_map/layout.py | 19 +++++++++++++++++-- requirements.txt | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/climate_emotions_map/layout.py b/climate_emotions_map/layout.py index e389057..b6a2efb 100644 --- a/climate_emotions_map/layout.py +++ b/climate_emotions_map/layout.py @@ -451,8 +451,23 @@ def create_domain_tabs(): dmc.TabsPanel( id=domain_full, children=[ - create_domain_heading(domain_full), - create_bar_plots_for_domain(domain_text=domain_full), + dcc.Loading( + id={ + "type": "domain-loading-overlay", + "domain": domain_full, + }, + children=[ + create_domain_heading(domain_full), + create_bar_plots_for_domain( + domain_text=domain_full + ), + ], + overlay_style={ + "visibility": "visible", + "filter": "blur(2px)", + }, + type="circle", + ), ], value=domain_full, pt="sm", diff --git a/requirements.txt b/requirements.txt index 0a6eb72..a4f7868 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,7 +26,7 @@ cryptography==42.0.5 # via # pyopenssl # urllib3 -dash==2.16.1 +dash==2.17.0 # via -r requirements.in dash-core-components==2.0.0 # via dash