From 903477bd0578a771ee3cd7035eebc7702af47451 Mon Sep 17 00:00:00 2001 From: Wes Date: Fri, 8 Nov 2024 13:56:08 -0700 Subject: [PATCH] feat: improve styling on tree header a bit - swap out icons for visibility indicators --- .../console/src/components/Multiselect.tsx | 6 ++-- .../src/features/modules/ModulesTree.tsx | 33 ++++++++++--------- .../src/features/modules/decls/DeclLink.tsx | 2 +- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/frontend/console/src/components/Multiselect.tsx b/frontend/console/src/components/Multiselect.tsx index 1883b0efa..222ee37a7 100644 --- a/frontend/console/src/components/Multiselect.tsx +++ b/frontend/console/src/components/Multiselect.tsx @@ -77,10 +77,10 @@ export const Multiselect = ({
- + {getSelectionText(selectedOpts, allOpts)} - - + +
diff --git a/frontend/console/src/features/modules/ModulesTree.tsx b/frontend/console/src/features/modules/ModulesTree.tsx index cbde67e4d..680936ea2 100644 --- a/frontend/console/src/features/modules/ModulesTree.tsx +++ b/frontend/console/src/features/modules/ModulesTree.tsx @@ -1,4 +1,4 @@ -import { ArrowRight01Icon, ArrowShrink02Icon, CircleArrowRight02Icon, CodeFolderIcon, Upload01Icon } from 'hugeicons-react' +import { ArrowRight01Icon, ArrowShrink02Icon, CircleArrowRight02Icon, CodeFolderIcon, ViewIcon, ViewOffSlashIcon } from 'hugeicons-react' import { useEffect, useMemo, useRef, useState } from 'react' import { Link, useParams, useSearchParams } from 'react-router-dom' import { Multiselect, sortMultiselectOpts } from '../../components/Multiselect' @@ -132,6 +132,7 @@ export const ModulesTree = ({ modules }: { modules: ModuleTreeItem[] }) => { const initialExpanded = listExpandedModulesFromLocalStorage() const [expandedModules, setExpandedModules] = useState(initialExpanded) + useEffect(() => { if (moduleName && declName) { addModuleToLocalStorageIfMissing(moduleName) @@ -171,29 +172,31 @@ export const ModulesTree = ({ modules }: { modules: ModuleTreeItem[] }) => { } modules.sort((m1, m2) => Number(m1.isBuiltin) - Number(m2.isBuiltin)) + return (