From 13c7ac42d156b5273c49b25b5a39a5fbb61abdee Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Mon, 5 Aug 2024 16:04:10 +0000 Subject: [PATCH] Visual tweaks for run panel --- gui/src/app/RunPanel/CompiledRunPanel.tsx | 17 ++++++++++++++--- gui/src/app/RunPanel/RunPanel.tsx | 10 +++++++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/gui/src/app/RunPanel/CompiledRunPanel.tsx b/gui/src/app/RunPanel/CompiledRunPanel.tsx index 167ed64..a48a2c1 100644 --- a/gui/src/app/RunPanel/CompiledRunPanel.tsx +++ b/gui/src/app/RunPanel/CompiledRunPanel.tsx @@ -19,8 +19,18 @@ type CompiledRunPanelProps = { errorMessage: string; }; -const loadingDiv =
Loading compiled Stan model...
; -const completedDiv =
done sampling
; +const loadingDiv = ( +
+
+ Loading compiled Stan model... +
+); +const completedDiv = ( +
+
+ done sampling +
+); const CompiledRunPanel: FunctionComponent = ({ handleRun, @@ -40,6 +50,7 @@ const CompiledRunPanel: FunctionComponent = ({ > cancel +
Sampling = ({ const failedDiv = (
+
Sampling failed!
{errorMessage}
(see browser console for more details) @@ -69,7 +81,6 @@ const CompiledRunPanel: FunctionComponent = ({ run sampling   -
{runStatus === "loading" ? ( loadingDiv ) : runStatus === "completed" ? ( diff --git a/gui/src/app/RunPanel/RunPanel.tsx b/gui/src/app/RunPanel/RunPanel.tsx index dc2c6c5..ce1ee76 100644 --- a/gui/src/app/RunPanel/RunPanel.tsx +++ b/gui/src/app/RunPanel/RunPanel.tsx @@ -12,6 +12,7 @@ import { import StanSampler from "@SpStanSampler/StanSampler"; import { StanRun } from "@SpStanSampler/useStanSampler"; import CompiledRunPanel from "./CompiledRunPanel"; +import CircularProgress from "@mui/material/CircularProgress"; type RunPanelProps = { sampler?: StanSampler; @@ -40,8 +41,7 @@ const RunPanel: FunctionComponent = ({ sampler.cancel(); }, [sampler]); - const { compile, compileMessage, compileStatus, validSyntax } = - useContext(CompileContext); + const { compile, compileStatus, validSyntax } = useContext(CompileContext); const { data: projectData } = useContext(ProjectContext); @@ -61,7 +61,11 @@ const RunPanel: FunctionComponent = ({
); - const compilingDiv =
{compileMessage}
; + const compilingDiv = ( +
+ +
+ ); return (