feat: add two-view architecture with sidebar navigation (Task 10.2)

- Add active_view and selected_comparison_directorate to app-state
- Sidebar: rename to Patient Pathways + add Trust Comparison nav item
- View container pattern: two view divs toggled by active_view
- Navigation callback: sidebar clicks switch views + update active state
- Trust Comparison placeholder landing page with tc-landing structure
This commit is contained in:
Andrew Charlwood
2026-02-06 21:38:12 +00:00
parent 94b1ac640a
commit 7d51efc25e
6 changed files with 116 additions and 19 deletions
+10 -4
View File
@@ -19,6 +19,7 @@ def _svg_icon(svg_body):
# SVG icon bodies (Feather-style)
_ICONS = {
"pathway": '<rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/>',
"compare": '<line x1="18" y1="20" x2="18" y2="10"/><line x1="12" y1="20" x2="12" y2="4"/><line x1="6" y1="20" x2="6" y2="14"/>',
}
@@ -28,15 +29,20 @@ def make_sidebar():
className="sidebar",
**{"aria-label": "Main navigation"},
children=[
# Overview section
html.Div(
className="sidebar__section",
children=[
html.Div("Overview", className="sidebar__label"),
_sidebar_item("Pathway Overview", "pathway", active=True),
html.Div("Analysis", className="sidebar__label"),
_sidebar_item(
"Patient Pathways", "pathway",
active=True, item_id="nav-patient-pathways",
),
_sidebar_item(
"Trust Comparison", "compare",
active=False, item_id="nav-trust-comparison",
),
],
),
# Footer
html.Div(
className="sidebar__footer",
children=[