From b50d28781f4ee8a0b60bdb342065658aa20ee107 Mon Sep 17 00:00:00 2001 From: vshnosngh Date: Fri, 13 Nov 2026 11:01:31 +0530 Subject: [PATCH] feat(sidebar): add floating category hover tooltip popup and upgrade to professional studio icons --- src/components/sections/ToolGridSection.tsx | 141 ++++++++++++++++---- 1 file changed, 112 insertions(+), 29 deletions(-) diff --git a/src/components/sections/ToolGridSection.tsx b/src/components/sections/ToolGridSection.tsx index c730092..1562ea1 100644 --- a/src/components/sections/ToolGridSection.tsx +++ b/src/components/sections/ToolGridSection.tsx @@ -11,14 +11,12 @@ import { Smartphone, ChevronRight, RotateCcw, + LayoutGrid, + ScanFace, + Wand2, + Scissors, + Palette, } from 'lucide-react'; -import { - FlaticonPortraitIcon, - FlaticonRestorationIcon, - FlaticonCutoutIcon, - FlaticonArtIcon, - FlaticonAllToolsIcon, -} from '@/components/icons/Flaticons'; import { ToolItem, CategoryItem, AppItem, resolveLocalised } from '@/types'; import { KineticText } from '@/components/magicui/kinetic-text'; import { AnimatedShinyText } from '@/components/magicui/animated-shiny-text'; @@ -353,39 +351,49 @@ const TOOL_MODEL_SPECS: Record = { 'hair-style-changer': 'FLUX.1-Fill Hairstyle Refiner', }; -// Category visual themes aligned to Porcelain Light theme with Flaticons +// Category visual themes aligned to Porcelain Light theme with Professional Icons const CATEGORY_THEMES: Record< string, { icon: React.ReactNode; + selectedIcon: React.ReactNode; largeIcon: React.ReactNode; color: string; badgeBg: string; + iconBg: string; } > = { 'portrait-retouch': { - icon: , - largeIcon: , + icon: , + selectedIcon: , + largeIcon: , color: 'text-rose-600', badgeBg: 'bg-rose-500/10 text-rose-700 border-rose-500/20', + iconBg: 'bg-rose-50', }, 'restoration': { - icon: , - largeIcon: , + icon: , + selectedIcon: , + largeIcon: , color: 'text-indigo-600', badgeBg: 'bg-indigo-500/10 text-indigo-700 border-indigo-500/20', + iconBg: 'bg-indigo-50', }, 'background-cutout': { - icon: , - largeIcon: , + icon: , + selectedIcon: , + largeIcon: , color: 'text-emerald-600', badgeBg: 'bg-emerald-500/10 text-emerald-700 border-emerald-500/20', + iconBg: 'bg-emerald-50', }, 'creative-art': { - icon: , - largeIcon: , + icon: , + selectedIcon: , + largeIcon: , color: 'text-amber-600', badgeBg: 'bg-amber-500/10 text-amber-700 border-amber-500/20', + iconBg: 'bg-amber-50', }, }; @@ -655,6 +663,13 @@ export function ToolGridSection({ }: ToolGridSectionProps) { const [selectedCategory, setSelectedCategory] = useState('all'); const [searchQuery, setSearchQuery] = useState(''); + const [hoveredCategory, setHoveredCategory] = useState<{ + id: string; + name: string; + count: number; + top: number; + left: number; + } | null>(null); // Group all tools by category const categorizedTools = useMemo(() => { @@ -794,7 +809,11 @@ export function ToolGridSection({ LEFT SIDEBAR: DOCKED DIRECTLY TO VIEWPORT EDGE (STICKY DESKTOP) High-contrast, clearly legible font with dedicated active category states ========================================================================= */} -