perf(ui): migrate icons to SVG sprite system

Replace @remixicon/react with a shared Icon component that renders
via <use href> references to a single hidden SVG sprite. This reduces
DOM node count by replacing inline SVGs with lightweight references.

- Create Icon component with sprite injection (packages/ui/src/components/icon/)
- Migrate all 164 files from @remixicon/react to Icon component
- Auto-generate sprite data from remixicon bundle (scripts/generate-icon-sprite.mjs)
- Add bun run icons:generate to package.json
- Move @remixicon/react to devDependencies
- Add icon usage instructions to theme-system skill
This commit is contained in:
Bohdan Triapitsyn
2026-05-13 13:26:35 +03:00
parent b4cbd7f0d6
commit 14357257ae
173 changed files with 2342 additions and 2227 deletions
@@ -1,9 +1,9 @@
import React from 'react';
import { RiBookletLine, RiFolder3Line, RiGitBranchLine } from '@remixicon/react';
import { SortableTabsStrip } from '@/components/ui/sortable-tabs-strip';
import { ProjectNotesTodoPanel } from '@/components/session/ProjectNotesTodoPanel';
import { GitView } from '@/components/views/GitView';
import { Icon } from "@/components/icon/Icon";
import { useGitStore } from '@/stores/useGitStore';
import { useProjectsStore } from '@/stores/useProjectsStore';
import { useDirectoryStore } from '@/stores/useDirectoryStore';
@@ -103,17 +103,17 @@ export const RightSidebarTabs: React.FC = () => {
{
id: 'git',
label: t('layout.rightSidebar.git'),
icon: <RiGitBranchLine className="h-3.5 w-3.5" />,
icon: <Icon name="git-branch" className="h-3.5 w-3.5" />,
},
{
id: 'files',
label: t('layout.rightSidebar.files'),
icon: <RiFolder3Line className="h-3.5 w-3.5" />,
icon: <Icon name="folder-3" className="h-3.5 w-3.5" />,
},
{
id: 'context',
label: t('layout.rightSidebar.context'),
icon: <RiBookletLine className="h-3.5 w-3.5" />,
icon: <Icon name="booklet" className="h-3.5 w-3.5" />,
},
], [t]);