From cdcd43af5b0b280172002f964f023555aa190211 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Sun, 8 Sep 2024 20:53:44 +0200 Subject: [PATCH] Fix a lot of styling in tree view and binop explain view Signed-off-by: Julius Volz --- .../ExplainViews/BinaryExpr/VectorVector.tsx | 71 +++++++++---------- .../src/pages/query/TreeNode.module.css | 4 +- 2 files changed, 34 insertions(+), 41 deletions(-) diff --git a/web/ui/mantine-ui/src/pages/query/ExplainViews/BinaryExpr/VectorVector.tsx b/web/ui/mantine-ui/src/pages/query/ExplainViews/BinaryExpr/VectorVector.tsx index 1ba2d0eb56..1ba42310ef 100644 --- a/web/ui/mantine-ui/src/pages/query/ExplainViews/BinaryExpr/VectorVector.tsx +++ b/web/ui/mantine-ui/src/pages/query/ExplainViews/BinaryExpr/VectorVector.tsx @@ -14,7 +14,6 @@ import { Alert, Anchor, Box, - Button, Group, List, Switch, @@ -393,7 +392,9 @@ const VectorVectorBinaryExprExplainView: FC< > Too many match groups to display, only showing{" "} {Object.keys(matchGroups).length} out of {numGroups} groups. - setMaxGroups(undefined)}> +
+
+ setMaxGroups(undefined)}> Show all groups @@ -423,20 +424,6 @@ const VectorVectorBinaryExprExplainView: FC< error, } = mg; - const noLHSMatches = lhs.length === 0; - const noRHSMatches = rhs.length === 0; - - const groupColor = colorPool[mgIdx % colorPool.length]; - const noMatchesColor = "#e0e0e0"; - const lhsGroupColor = noLHSMatches - ? noMatchesColor - : groupColor; - const rhsGroupColor = noRHSMatches - ? noMatchesColor - : groupColor; - const resultGroupColor = - noLHSMatches || noRHSMatches ? noMatchesColor : groupColor; - const matchGroupTitleRow = (color: string) => ( ( {series.length === 0 ? ( @@ -510,22 +503,15 @@ const VectorVectorBinaryExprExplainView: FC< )} {seriesCount > series.length && ( - + {seriesCount - series.length} more series omitted - – - + Show all series + )} @@ -534,11 +520,16 @@ const VectorVectorBinaryExprExplainView: FC< ); - const lhsTable = matchGroupTable(lhs, lhsCount, lhsGroupColor); + const noLHSMatches = lhs.length === 0; + const noRHSMatches = rhs.length === 0; + + const groupColor = colorPool[mgIdx % colorPool.length]; + + const lhsTable = matchGroupTable(lhs, lhsCount, groupColor); const rhsTable = matchGroupTable( rhs, rhsCount, - rhsGroupColor, + groupColor, rhsColorOffset ); @@ -546,7 +537,11 @@ const VectorVectorBinaryExprExplainView: FC<
@@ -554,9 +549,8 @@ const VectorVectorBinaryExprExplainView: FC< {noLHSMatches || noRHSMatches ? ( @@ -566,9 +560,8 @@ const VectorVectorBinaryExprExplainView: FC< ) : error !== null ? ( diff --git a/web/ui/mantine-ui/src/pages/query/TreeNode.module.css b/web/ui/mantine-ui/src/pages/query/TreeNode.module.css index da3b8436b4..80845d921f 100644 --- a/web/ui/mantine-ui/src/pages/query/TreeNode.module.css +++ b/web/ui/mantine-ui/src/pages/query/TreeNode.module.css @@ -10,8 +10,8 @@ .nodeText.nodeTextSelected, .nodeText.nodeTextSelected:hover { background-color: light-dark( - var(--mantine-color-gray-3), - var(--mantine-color-dark-3) + var(--mantine-color-gray-4), + var(--mantine-color-gray-7) ); border: 2px solid light-dark(var(--mantine-color-gray-5), var(--mantine-color-dark-2));