From 744444d6990696196982c6798080ed8fe81189dd Mon Sep 17 00:00:00 2001 From: c-bata Date: Fri, 6 Jan 2023 20:27:57 +0900 Subject: [PATCH] Move PageId definition to AppDrawer --- optuna_dashboard/ts/components/AppDrawer.tsx | 7 +++++++ optuna_dashboard/ts/components/StudyDetailBeta.tsx | 2 +- optuna_dashboard/ts/types/index.d.ts | 2 -- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/optuna_dashboard/ts/components/AppDrawer.tsx b/optuna_dashboard/ts/components/AppDrawer.tsx index bc889c7e..99306435 100644 --- a/optuna_dashboard/ts/components/AppDrawer.tsx +++ b/optuna_dashboard/ts/components/AppDrawer.tsx @@ -33,6 +33,13 @@ import { Switch } from "@mui/material" const drawerWidth = 240 +export type PageId = + | "history" + | "analytics" + | "trialTable" + | "trialList" + | "note" + const openedMixin = (theme: Theme): CSSObject => ({ width: drawerWidth, transition: theme.transitions.create("width", { diff --git a/optuna_dashboard/ts/components/StudyDetailBeta.tsx b/optuna_dashboard/ts/components/StudyDetailBeta.tsx index 2152cf90..a98c3d04 100644 --- a/optuna_dashboard/ts/components/StudyDetailBeta.tsx +++ b/optuna_dashboard/ts/components/StudyDetailBeta.tsx @@ -24,7 +24,7 @@ import { useStudySummaryValue, } from "../state" import { TrialTable } from "./TrialTable" -import { AppDrawer } from "./AppDrawer" +import { AppDrawer, PageId } from "./AppDrawer" import { GraphParallelCoordinate } from "./GraphParallelCoordinate" import { Contour } from "./GraphContour" import { GraphHyperparameterImportanceBeta } from "./GraphHyperparameterImportances" diff --git a/optuna_dashboard/ts/types/index.d.ts b/optuna_dashboard/ts/types/index.d.ts index 2c71848a..425045a2 100644 --- a/optuna_dashboard/ts/types/index.d.ts +++ b/optuna_dashboard/ts/types/index.d.ts @@ -16,8 +16,6 @@ type Distribution = | "IntDistribution" | "CategoricalDistribution" -type PageId = "history" | "analytics" | "trialTable" | "trialList" | "note" - type GraphVisibility = { history: boolean paretoFront: boolean