From 70089520a3da42a893c2ec68c3e5918a3df9f56d Mon Sep 17 00:00:00 2001 From: Mats Walfridsson <61554783+wlfrdssn@users.noreply.github.com> Date: Fri, 27 Dec 2024 22:40:58 +0100 Subject: [PATCH] Symbols for each column I crosschecked the symbols with a purple pen and it seems like kind match column for all columns except column E which contains both kind E and D. I changed from all symbols to what I hope are the correct symbols for each column. There was an issue with svg-control-descriptions. Symbol "bend" was assigned to wrong kind in lang.json. --- src/ControlDescriptionSheet.jsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ControlDescriptionSheet.jsx b/src/ControlDescriptionSheet.jsx index ece6efc..c042d5d 100644 --- a/src/ControlDescriptionSheet.jsx +++ b/src/ControlDescriptionSheet.jsx @@ -232,14 +232,14 @@ function DescriptionSelector({ function DescriptionList({ selected, onSelect, column }) { const symbols = useMemo(() => { - const symbols = Object.keys(DefinitionTexts); + const symbols = Object.keys(DefinitionTexts).filter((key) => { + if (column === "E") { + return DefinitionTexts[key].kind === "E" || DefinitionTexts[key].kind === "D"; + } + return DefinitionTexts[key].kind === column; + }); symbols.sort((a, b) => { - const aDef = DefinitionTexts[a]; - const bDef = DefinitionTexts[b]; - const aIsCol = aDef.kind === column ? -1 : 1; - const bIsCol = bDef.kind === column ? -1 : 1; - - return compare(aIsCol, bIsCol) || compare(a, b); + return compare(a, b); }); return symbols; }, [column]);