From e275eabb11a34fbec726090d25183afccbb61b26 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Fri, 10 Feb 2023 05:37:42 +0000 Subject: [PATCH] fix problems panel not scrolling far enough (#676) --- .../src/components/Diff/CompilationPanel.tsx | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/frontend/src/components/Diff/CompilationPanel.tsx b/frontend/src/components/Diff/CompilationPanel.tsx index fcfeda8e..150090b9 100644 --- a/frontend/src/components/Diff/CompilationPanel.tsx +++ b/frontend/src/components/Diff/CompilationPanel.tsx @@ -71,28 +71,30 @@ export default function CompilationPanel({ compilation, isCompiling, isCompilati minSize={problemsCollapsedHeight} preferredSize={isProblemsCollapsed ? problemsCollapsedHeight : problemsDefaultHeight} > -

- - {(problemState == ProblemState.NO_PROBLEMS) ? "No problems" : "Problems"} - -
- { - const containerHeight = container.current?.clientHeight ?? 0 - const newProblemsHeight = isProblemsCollapsed ? problemsDefaultHeight : problemsCollapsedHeight - allotment.current?.resize([ - containerHeight - newProblemsHeight, - newProblemsHeight, - ]) - }} - > - {isProblemsCollapsed ? : } - -

+
+

+ + {(problemState == ProblemState.NO_PROBLEMS) ? "No problems" : "Problems"} + +
+ { + const containerHeight = container.current?.clientHeight ?? 0 + const newProblemsHeight = isProblemsCollapsed ? problemsDefaultHeight : problemsCollapsedHeight + allotment.current?.resize([ + containerHeight - newProblemsHeight, + newProblemsHeight, + ]) + }} + > + {isProblemsCollapsed ? : } + +

-
- {compilation.compiler_output} +
+ {compilation.compiler_output} +