From 3ecdf641d3c253a5ecc40d15b72685e03e724c2f Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Thu, 13 Mar 2025 14:57:00 -0600 Subject: [PATCH] fix sidebar settings for interfaces --- .../share/verificationInterfaces.ts | 12 ++++----- .../components/features/list/FavoriteStar.tsx | 5 ++-- .../StatusBadgeIndicator.tsx | 9 +++---- .../sidebars/SidebarPrimary.stories.tsx | 6 ++--- .../features/sidebars/SidebarPrimary.tsx | 27 +++++++++++++++---- .../sidebars/SidebarSettings.stories.tsx | 1 + .../features/sidebars/SidebarSettings.tsx | 3 +++ web/src/components/ui/sidebar/Sidebar.tsx | 9 ++----- .../ui/sidebar/SidebarCollapsible.tsx | 12 +++++++-- .../ui/sidebar/SidebarItem.stories.tsx | 6 ++--- web/src/components/ui/sidebar/SidebarItem.tsx | 8 ++++-- web/src/components/ui/sidebar/interfaces.ts | 2 ++ web/src/components/ui/tooltip/TooltipBase.tsx | 2 +- 13 files changed, 66 insertions(+), 36 deletions(-) diff --git a/web/src/api/asset_interfaces/share/verificationInterfaces.ts b/web/src/api/asset_interfaces/share/verificationInterfaces.ts index fed73962b..5573f6edd 100644 --- a/web/src/api/asset_interfaces/share/verificationInterfaces.ts +++ b/web/src/api/asset_interfaces/share/verificationInterfaces.ts @@ -1,8 +1,8 @@ export enum VerificationStatus { - NOT_REQUESTED = 'NOT REQUESTED', - REQUESTED = 'REQUESTED', - IN_REVIEW = 'IN REVIEW', - VERIFIED = 'VERIFIED', - BACKLOGGED = 'BACKLOGGED', - NOT_VERIFIED = 'NOT VERIFIED' + NOT_REQUESTED = 'notRequested', + REQUESTED = 'requested', + IN_REVIEW = 'inReview', + VERIFIED = 'verified', + BACKLOGGED = 'backlogged', + NOT_VERIFIED = 'notVerified' } diff --git a/web/src/components/features/list/FavoriteStar.tsx b/web/src/components/features/list/FavoriteStar.tsx index 3bf29458b..314978384 100644 --- a/web/src/components/features/list/FavoriteStar.tsx +++ b/web/src/components/features/list/FavoriteStar.tsx @@ -5,6 +5,7 @@ import { useMemoizedFn } from '@/hooks'; import { Button } from '@/components/ui/buttons'; import { cn } from '@/lib/classMerge'; import { Star } from '@/components/ui/icons'; +import { Star as StarFilled } from '@/components/ui/icons/NucleoIconFilled'; import { cva } from 'class-variance-authority'; import { useAddUserFavorite, @@ -62,7 +63,7 @@ export const FavoriteStar: React.FC<{ return ( + onClick={(e) => { + e.stopPropagation(); + e.preventDefault(); + onRemove(); + }}> )} ); diff --git a/web/src/components/ui/sidebar/interfaces.ts b/web/src/components/ui/sidebar/interfaces.ts index a09a177b8..9fc096aae 100644 --- a/web/src/components/ui/sidebar/interfaces.ts +++ b/web/src/components/ui/sidebar/interfaces.ts @@ -14,6 +14,7 @@ export interface ISidebarItem { export interface ISidebarGroup { label: string; icon?: React.ReactNode; + id: string; items: ISidebarItem[]; variant?: 'collapsible' | 'icon'; //default is collapsible defaultOpen?: boolean; //will default to true @@ -23,6 +24,7 @@ export interface ISidebarGroup { export interface ISidebarList { items: ISidebarItem[]; + id: string; } type SidebarContent = ISidebarGroup | ISidebarList; diff --git a/web/src/components/ui/tooltip/TooltipBase.tsx b/web/src/components/ui/tooltip/TooltipBase.tsx index 850004737..dfb5e3228 100644 --- a/web/src/components/ui/tooltip/TooltipBase.tsx +++ b/web/src/components/ui/tooltip/TooltipBase.tsx @@ -13,7 +13,7 @@ const TooltipTrigger = TooltipPrimitive.Trigger; const TooltipContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef ->(({ className, sideOffset = 6, ...props }, ref) => ( +>(({ className, sideOffset = 4, ...props }, ref) => (