Skip to content

Commit 26ecb45

Browse files
committed
cleanup: Standardize iconify lucide icon uses to the class form
cleanup: Remove safelist now that the icon classes are used explicitly style: scale icons to 1.2 to match SVGs' default
1 parent 022cf6d commit 26ecb45

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+122
-116
lines changed

.storybook/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ This Storybook setup includes:
211211

212212
## Icon Usage in Storybook
213213

214-
In this project, the `<i-lucide:... />` syntax from unplugin-icons is not supported in Storybook.
214+
In this project, the `<i class="icon-[lucide--folder]" />` syntax from unplugin-icons is not supported in Storybook.
215215

216216
**Example:**
217217

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ pnpm format
255255
The project supports three types of icons, all with automatic imports (no manual imports needed):
256256

257257
1. **PrimeIcons** - Built-in PrimeVue icons using CSS classes: `<i class="pi pi-plus" />`
258-
2. **Iconify Icons** - 200,000+ icons from various libraries: `<i-lucide:settings />`, `<i-mdi:folder />`
258+
2. **Iconify Icons** - 200,000+ icons from various libraries: `<i class="icon-[lucide--settings]" />`, `<iclass="icon-[mdi--folder]" />`
259259
3. **Custom Icons** - Your own SVG icons: `<i-comfy:workflow />`
260260

261261
Icons are powered by the unplugin-icons system, which automatically discovers and imports icons as Vue components. Custom icons are stored in `packages/design-system/src/icons/` and processed by `packages/design-system/src/iconCollection.ts` with automatic validation.

apps/desktop-ui/src/components/install/GpuPicker.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
:value="$t('install.gpuPicker.recommended')"
5454
class="bg-neutral-300 text-neutral-900 rounded-full text-sm font-bold px-2 py-[1px]"
5555
/>
56-
<i-lucide:badge-check class="text-neutral-300 text-lg" />
56+
<i class="icon-[lucide--badge-check] text-neutral-300 text-lg" />
5757
</div>
5858
</div>
5959

packages/design-system/src/icons/README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ ComfyUI supports three types of icons that can be used throughout the interface.
2626
```vue
2727
<template>
2828
<!-- Primary icon set: Lucide -->
29-
<i-lucide:download />
30-
<i-lucide:settings />
31-
<i-lucide:workflow class="text-2xl" />
29+
<i class="icon-[lucide--download]" />
30+
<i class="icon-[lucide--settings]" />
31+
<i class="icon-[lucide--workflow]" class="text-2xl" />
3232
3333
<!-- Other popular icon sets -->
3434
<i-mdi:folder-open />
@@ -41,7 +41,7 @@ ComfyUI supports three types of icons that can be used throughout the interface.
4141
<!-- Carbon Icons -->
4242
4343
<!-- With styling -->
44-
<i-lucide:save class="w-6 h-6 text-blue-500" />
44+
<i class="icon-[lucide--save]" class="w-6 h-6 text-blue-500" />
4545
</template>
4646
```
4747

@@ -77,7 +77,7 @@ ComfyUI supports three types of icons that can be used throughout the interface.
7777
<!-- Iconify/Custom in button (template) -->
7878
<Button>
7979
<template #icon>
80-
<i-lucide:save />
80+
<i class="icon-[lucide--save]" />
8181
</template>
8282
Save File
8383
</Button>
@@ -88,8 +88,8 @@ ComfyUI supports three types of icons that can be used throughout the interface.
8888

8989
```vue
9090
<template>
91-
<i-lucide:eye v-if="isVisible" />
92-
<i-lucide:eye-off v-else />
91+
<i class="icon-[lucide--eye]" v-if="isVisible" />
92+
<i class="icon-[lucide--eye-off]" v-else />
9393
9494
<!-- Or with ternary -->
9595
<component :is="isLocked ? 'i-lucide:lock' : 'i-lucide:lock-open'" />
@@ -100,7 +100,7 @@ ComfyUI supports three types of icons that can be used throughout the interface.
100100

101101
```vue
102102
<template>
103-
<i-lucide:info
103+
<i class="icon-[lucide--info]"
104104
v-tooltip="'Click for more information'"
105105
class="cursor-pointer"
106106
/>
@@ -174,20 +174,20 @@ No imports needed - icons are auto-discovered!
174174
```vue
175175
<template>
176176
<!-- Size with Tailwind classes -->
177-
<i-lucide:plus class="w-4 h-4" />
177+
<i class="icon-[lucide--plus]" class="w-4 h-4" />
178178
<!-- 16px -->
179-
<i-lucide:plus class="w-6 h-6" />
179+
<i class="icon-[lucide--plus]" class="w-6 h-6" />
180180
<!-- 24px (default) -->
181-
<i-lucide:plus class="w-8 h-8" />
181+
<i class="icon-[lucide--plus]" class="w-8 h-8" />
182182
<!-- 32px -->
183183
184184
<!-- Or text size -->
185-
<i-lucide:plus class="text-sm" />
186-
<i-lucide:plus class="text-2xl" />
185+
<i class="icon-[lucide--plus]" class="text-sm" />
186+
<i class="icon-[lucide--plus]" class="text-2xl" />
187187
188188
<!-- Colors -->
189-
<i-lucide:check class="text-green-500" />
190-
<i-lucide:x class="text-red-500" />
189+
<i class="icon-[lucide--check]" class="text-green-500" />
190+
<i class="icon-[lucide--x]" class="text-red-500" />
191191
</template>
192192
```
193193

@@ -219,7 +219,7 @@ Always use `currentColor` in SVGs for automatic theme adaptation:
219219
<!-- After -->
220220
<Button>
221221
<template #icon>
222-
<i-lucide:download />
222+
<i class="icon-[lucide--download]" />
223223
</template>
224224
</Button>
225225
</template>

packages/design-system/tailwind.config.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,13 @@ import { addDynamicIconSelectors } from '@iconify/tailwind'
44
import { iconCollection } from './src/iconCollection'
55

66
export default {
7-
content: [],
8-
safelist: [
9-
'icon-[lucide--folder]',
10-
'icon-[lucide--package]',
11-
'icon-[lucide--image]',
12-
'icon-[lucide--video]',
13-
'icon-[lucide--box]',
14-
'icon-[lucide--audio-waveform]',
15-
'icon-[lucide--message-circle]'
16-
],
177
plugins: [
188
addDynamicIconSelectors({
199
iconSets: {
2010
comfy: iconCollection,
2111
lucide
2212
},
13+
scale: 1.2,
2314
prefix: 'icon'
2415
})
2516
]

src/components/actionbar/ComfyQueueButton.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@
1616
@click="queuePrompt"
1717
>
1818
<template #icon>
19-
<i-lucide:list-start v-if="workspaceStore.shiftDown" />
20-
<i-lucide:play v-else-if="queueMode === 'disabled'" />
21-
<i-lucide:fast-forward v-else-if="queueMode === 'instant'" />
22-
<i-lucide:step-forward v-else-if="queueMode === 'change'" />
19+
<i v-if="workspaceStore.shiftDown" class="icon-[lucide--list-start]" />
20+
<i v-else-if="queueMode === 'disabled'" class="icon-[lucide--play]" />
21+
<i
22+
v-else-if="queueMode === 'instant'"
23+
class="icon-[lucide--fast-forward]"
24+
/>
25+
<i
26+
v-else-if="queueMode === 'change'"
27+
class="icon-[lucide--step-forward]"
28+
/>
2329
</template>
2430
<template #item="{ item }">
2531
<Button

src/components/button/MoreButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="relative inline-flex items-center">
33
<IconButton @click="toggle">
4-
<i-lucide:more-vertical class="text-sm" />
4+
<i class="icon-[lucide--more-vertical] text-sm" />
55
</IconButton>
66

77
<Popover

src/components/custom/widget/WorkflowTemplateSelectorDialog.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
@click="resetFilters"
3030
>
3131
<template #icon>
32-
<i-lucide:filter-x />
32+
<i class="icon-[lucide--filter-x]" />
3333
</template>
3434
</IconTextButton>
3535
</div>
@@ -49,7 +49,7 @@
4949
:show-clear-button="true"
5050
>
5151
<template #icon>
52-
<i-lucide:cpu />
52+
<i class="icon-[lucide--cpu]" />
5353
</template>
5454
</MultiSelect>
5555

@@ -63,7 +63,7 @@
6363
:show-clear-button="true"
6464
>
6565
<template #icon>
66-
<i-lucide:target />
66+
<i class="icon-[lucide--target]" />
6767
</template>
6868
</MultiSelect>
6969

@@ -77,7 +77,7 @@
7777
:show-clear-button="true"
7878
>
7979
<template #icon>
80-
<i-lucide:file-text />
80+
<i class="icon-[lucide--file-text]" />
8181
</template>
8282
</MultiSelect>
8383

@@ -90,7 +90,7 @@
9090
class="min-w-[270px]"
9191
>
9292
<template #icon>
93-
<i-lucide:arrow-up-down />
93+
<i class="icon-[lucide--arrow-up-down]" />
9494
</template>
9595
</SingleSelect>
9696
</div>
@@ -111,7 +111,7 @@
111111
v-if="!isLoading && filteredTemplates.length === 0"
112112
class="flex flex-col items-center justify-center h-64 text-neutral-500"
113113
>
114-
<i-lucide:search class="w-12 h-12 mb-4 opacity-50" />
114+
<i class="icon-[lucide--search] w-12 h-12 mb-4 opacity-50" />
115115
<p class="text-lg mb-2">
116116
{{ $t('templateWorkflows.noResults', 'No templates found') }}
117117
</p>

src/components/graph/GraphCanvasMenu.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
@click="() => commandStore.execute('Comfy.Canvas.Unlock')"
2626
>
2727
<template #icon>
28-
<i-lucide:mouse-pointer-2 />
28+
<i class="icon-[lucide--mouse-pointer-2]" />
2929
</template>
3030
</Button>
3131

@@ -39,7 +39,7 @@
3939
@click="() => commandStore.execute('Comfy.Canvas.Lock')"
4040
>
4141
<template #icon>
42-
<i-lucide:hand />
42+
<i class="icon-[lucide--hand]" />
4343
</template>
4444
</Button>
4545

@@ -56,7 +56,7 @@
5656
@click="() => commandStore.execute('Comfy.Canvas.FitView')"
5757
>
5858
<template #icon>
59-
<i-lucide:focus />
59+
<i class="icon-[lucide--focus]" />
6060
</template>
6161
</Button>
6262

@@ -73,7 +73,7 @@
7373
>
7474
<span class="inline-flex text-xs">
7575
<span>{{ canvasStore.appScalePercentage }}%</span>
76-
<i-lucide:chevron-down />
76+
<i class="icon-[lucide--chevron-down]" />
7777
</span>
7878
</Button>
7979

@@ -90,7 +90,7 @@
9090
@click="() => commandStore.execute('Workspace.ToggleFocusMode')"
9191
>
9292
<template #icon>
93-
<i-lucide:lightbulb />
93+
<i class="icon-[lucide--lightbulb]" />
9494
</template>
9595
</Button>
9696

@@ -111,7 +111,7 @@
111111
@click="() => commandStore.execute('Comfy.Canvas.ToggleLinkVisibility')"
112112
>
113113
<template #icon>
114-
<i-lucide:route-off />
114+
<i class="icon-[lucide--route-off]" />
115115
</template>
116116
</Button>
117117
</ButtonGroup>

src/components/graph/selectionToolbox/BypassButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
@click="toggleBypass"
1212
>
1313
<template #icon>
14-
<i-lucide:ban class="w-4 h-4" />
14+
<i class="icon-[lucide--ban] w-4 h-4" />
1515
</template>
1616
</Button>
1717
</template>

0 commit comments

Comments
 (0)