Skip to content

Commit 627ebf1

Browse files
authored
Merge pull request #949 from c-bata/improve-settings-component
Improve settings component
2 parents 38c5b32 + 36d094a commit 627ebf1

File tree

2 files changed

+30
-24
lines changed

2 files changed

+30
-24
lines changed

optuna_dashboard/ts/components/AppDrawer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,8 @@ export const AppDrawer: FC<{
384384
left: "50%",
385385
transform: "translate(-50%, -50%)",
386386
overflow: "scroll",
387-
width: "500px",
388-
height: "400px",
387+
width: "600px",
388+
height: "600px",
389389
bgcolor: "background.paper",
390390
}}
391391
>

optuna_dashboard/ts/components/Settings.tsx

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import ClearIcon from "@mui/icons-material/Clear"
22
import {
33
Box,
44
IconButton,
5+
Link,
56
MenuItem,
67
Select,
78
SelectChangeEvent,
@@ -68,31 +69,29 @@ export const Settings = ({ handleClose }: SettingsProps) => {
6869
</Typography>
6970
{theme.palette.mode === "dark" ? (
7071
<>
71-
<Stack direction="row" spacing={2} alignItems="center">
72-
<Typography variant="h6">Dark Mode</Typography>
73-
<Select
74-
disabled
75-
value={plotlyColorTheme.dark}
76-
onChange={handleDarkModeColorChange}
77-
>
78-
{(
79-
[{ value: "default", label: "Default" }] as {
80-
value: PlotlyColorThemeDark
81-
label: string
82-
}[]
83-
).map((v) => (
84-
<MenuItem key={v.value} value={v.value}>
85-
{v.label}
86-
</MenuItem>
87-
))}
88-
</Select>
89-
</Stack>
72+
<Typography variant="h6">Dark Mode</Typography>
9073
<Typography color="textSecondary">
9174
Only the "Default" color scale is supported in dark mode
9275
</Typography>
76+
<Select
77+
disabled
78+
value={plotlyColorTheme.dark}
79+
onChange={handleDarkModeColorChange}
80+
>
81+
{(
82+
[{ value: "default", label: "Default" }] as {
83+
value: PlotlyColorThemeDark
84+
label: string
85+
}[]
86+
).map((v) => (
87+
<MenuItem key={v.value} value={v.value}>
88+
{v.label}
89+
</MenuItem>
90+
))}
91+
</Select>
9392
</>
9493
) : (
95-
<Stack direction="row" spacing={2} alignItems="center">
94+
<>
9695
<Typography variant="h6">Light Mode</Typography>
9796
<Select
9897
value={plotlyColorTheme.light}
@@ -114,7 +113,7 @@ export const Settings = ({ handleClose }: SettingsProps) => {
114113
</MenuItem>
115114
))}
116115
</Select>
117-
</Stack>
116+
</>
118117
)}
119118
</Stack>
120119

@@ -123,7 +122,14 @@ export const Settings = ({ handleClose }: SettingsProps) => {
123122
variant="h5"
124123
sx={{ fontWeight: theme.typography.fontWeightBold }}
125124
>
126-
Use Plotlypy
125+
Use Plotly Python library
126+
</Typography>
127+
<Typography color="textSecondary">
128+
{"If enabled, the plots will be rendered using the "}
129+
<Link href="https://optuna.readthedocs.io/en/stable/reference/visualization/index.html">
130+
optuna.visualization module
131+
</Link>
132+
.
127133
</Typography>
128134
<Switch
129135
checked={plotBackendRendering}

0 commit comments

Comments
 (0)