Skip to content

Commit

Permalink
Remove dashboard container and fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
huong-li-nguyen committed Dec 21, 2023
1 parent 8a156f9 commit 7bb3614
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions vizro-core/src/vizro/models/_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,9 @@ def build(self):
def _get_page_divs(self, page: Page) -> _PageDivsType:
# Identical across pages
dashboard_title = (
html.Div([html.H2(self.title)], id="dashboard-title")
if self.title
else html.Div(id="dashboard-title", hidden=True)
html.H2(self.title, id="dashboard-title") if self.title else html.H2(hidden=True, id="dashboard-title")
)

settings = html.Div(
daq.BooleanSwitch(
id="theme_selector", on=self.theme == "vizro_dark", persistence=True, persistence_type="session"
Expand All @@ -149,7 +148,7 @@ def _get_page_divs(self, page: Page) -> _PageDivsType:
components = page_content["components"]
return html.Div([dashboard_title, settings, page_title, nav_bar, nav_panel, control_panel, components])

def _arrange_page_divs(self, page_divs: html.Div):
def _arrange_page_divs(self, page_divs: _PageDivsType):
left_header_divs = [page_divs["dashboard-title"]]
left_sidebar_divs = [page_divs["nav-bar"]]
left_main_divs = [
Expand Down

0 comments on commit 7bb3614

Please sign in to comment.