feat(UX-001): add full-width two-pane dashboard layout
This commit is contained in:
@@ -123,6 +123,17 @@ def strategy_metrics(
|
||||
return strategy_metrics_from_snapshot(strategy, scenario_pct, portfolio)
|
||||
|
||||
|
||||
def split_page_panes(*, left_testid: str, right_testid: str) -> tuple[ui.column, ui.column]:
|
||||
with ui.row().classes("w-full items-start gap-6 max-lg:flex-col lg:flex-nowrap"):
|
||||
left = ui.column().classes("min-w-0 w-full gap-6 lg:w-1/3 lg:flex-none").props(
|
||||
f"data-testid={left_testid}"
|
||||
)
|
||||
right = ui.column().classes("min-w-0 w-full gap-6 lg:w-2/3 lg:flex-none").props(
|
||||
f"data-testid={right_testid}"
|
||||
)
|
||||
return left, right
|
||||
|
||||
|
||||
@contextmanager
|
||||
def dashboard_page(title: str, subtitle: str, current: str, workspace_id: str | None = None) -> Iterator[ui.column]:
|
||||
ui.colors(primary="#0f172a", secondary="#1e293b", accent="#0ea5e9")
|
||||
@@ -146,7 +157,7 @@ def dashboard_page(title: str, subtitle: str, current: str, workspace_id: str |
|
||||
)
|
||||
ui.link(label, href).classes(link_classes)
|
||||
|
||||
with ui.column().classes("mx-auto w-full max-w-7xl gap-6 bg-slate-50 p-6 dark:bg-slate-950") as container:
|
||||
with ui.column().classes("w-full gap-6 bg-slate-50 p-6 dark:bg-slate-950") as container:
|
||||
with ui.row().classes("w-full items-end justify-between gap-4 max-md:flex-col max-md:items-start"):
|
||||
with ui.column().classes("gap-1"):
|
||||
ui.label(title).classes("text-3xl font-bold text-slate-900 dark:text-slate-50")
|
||||
|
||||
Reference in New Issue
Block a user