From 5257865b47a84b48349e732e11912d227ac469a4 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Sat, 7 Oct 2023 22:49:37 +0200 Subject: [PATCH] highlight only goals without command #115 --- client/src/components/infoview/infoview.css | 5 ++++- client/src/components/infoview/main.tsx | 8 ++++---- client/src/components/level.css | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/client/src/components/infoview/infoview.css b/client/src/components/infoview/infoview.css index 4142917..274c022 100644 --- a/client/src/components/infoview/infoview.css +++ b/client/src/components/infoview/infoview.css @@ -157,7 +157,10 @@ background-color: #bbb; padding: .5em; border-radius: .2em; - margin-bottom: 2rem; + /* TODO: It seems my browsers merge the margings of the proof steps, + so that it only shows once 0.5rem instead of twice. Thus have 1.5 here now. + */ + margin-bottom: 1.5rem; display: flex; flex-direction: row; } diff --git a/client/src/components/infoview/main.tsx b/client/src/components/infoview/main.tsx index f7ce27f..853f79c 100644 --- a/client/src/components/infoview/main.tsx +++ b/client/src/components/infoview/main.tsx @@ -261,12 +261,12 @@ function Command({ command, deleteProof }: { command: string, deleteProof: any } // }, fastIsEqual) /** The tabs of goals that lean ahs after the command of this step has been processed */ -function GoalsTab({ proofStep, last}: { proofStep: ProofStep, last : boolean }) { +function GoalsTabs({ proofStep, last, onClick}: { proofStep: ProofStep, last : boolean, onClick? : any }) { const [selectedGoal, setSelectedGoal] = React.useState(0) if (!proofStep.goals.length) { return <> } - return
+ return
{proofStep.goals.map((goal, i) => ( // TODO: Should not use index as key. @@ -441,7 +441,7 @@ export function TypewriterInterface(props: { world: string, level: number, data:
} else { - return
+ return
{mobile && i == 0 && props.data?.introduction && @@ -460,7 +460,7 @@ export function TypewriterInterface(props: { world: string, level: number, data: } } - + {/* Show a message that there are no goals left */} {!step.goals.length && (
diff --git a/client/src/components/level.css b/client/src/components/level.css index 4439bd9..923105d 100644 --- a/client/src/components/level.css +++ b/client/src/components/level.css @@ -257,7 +257,7 @@ td code { box-shadow: .0em .0em .4em .1em #8cbbe9; } -.exercise .step.selected, .chat .selected { +.exercise .step.selected .goal-tabs, .chat .selected { /* border: 3px solid #5191d1; */ box-shadow: .0em .0em .4em .1em var(--clr-primary); }