Skip to content

Commit e292ee7

Browse files
authored
fix(app): icon shake (#2890)
Addressed concerns @cor: switched to direct import for icons, ensuring minimal impact since we're importing only a few.
2 parents 059ca2c + 932437d commit e292ee7

File tree

5 files changed

+33
-272
lines changed

5 files changed

+33
-272
lines changed

app/src/generated/graphql-env.d.ts

+8-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/lib/components/search/cmdk.svelte

+14-37
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ import Kbd from "$lib/components/kbd.svelte"
1515
import { sepoliaStore } from "$lib/wallet/evm"
1616
import { cosmosStore } from "$lib/wallet/cosmos"
1717
import { derived, writable } from "svelte/store"
18-
import SmileIcon from "virtual:icons/lucide/smile"
19-
import TableIcon from "virtual:icons/lucide/table"
20-
import BrainIcon from "virtual:icons/lucide/brain"
2118
import Badge from "$lib/components/ui/badge/badge.svelte"
2219
import * as Command from "$lib/components/ui/command/index.ts"
23-
import DollarSignIcon from "virtual:icons/lucide/badge-dollar-sign"
24-
import UnionIcon from "$lib/components/union-icons/index.svelte"
25-
import { mode } from "mode-watcher"
20+
import FaucetIcon from "$lib/components/union-icons/mono/icon-faucet-mono.svelte"
21+
import TransfersIcon from "$lib/components/union-icons/mono/icon-transfers-mono.svelte"
22+
import UserTransfersIcon from "$lib/components/union-icons/mono/icon-usertransfers-mono.svelte"
23+
import ChannelIcon from "$lib/components/union-icons/mono/icon-channel-mono.svelte"
24+
import IbcConnectionsIcon from "$lib/components/union-icons/mono/icon-ibcconnections-mono.svelte"
25+
import IbcChannelsIcon from "$lib/components/union-icons/mono/icon-ibcchannels-mono.svelte"
26+
import HubbleStatusIcon from "$lib/components/union-icons/mono/icon-hubblestatus-mono.svelte"
2627
2728
let searchInput = writable("")
2829
searchInput.update($searchInput => $searchInput.replaceAll(" ", ""))
@@ -206,7 +207,7 @@ const DISABLE_TAB_INDEX = -1
206207
}}
207208
>
208209

209-
<UnionIcon theme="mono" name="faucet" class="mr-2 size-5"/>
210+
<FaucetIcon class="mr-2 size-5"/>
210211
<span>Get tokens from faucet</span>
211212
{#if $page.route.id?.startsWith('/faucet')}
212213
<Badge
@@ -233,11 +234,7 @@ const DISABLE_TAB_INDEX = -1
233234
commandDialogOpen = false
234235
}}
235236
>
236-
<UnionIcon
237-
theme="mono"
238-
name="transfers"
239-
class="mr-2 size-5"
240-
/>
237+
<TransfersIcon class="mr-2 size-5"/>
241238
<span>Transfer assets across chains</span>
242239
{#if $page.route.id?.startsWith('/transfer')}
243240
<Badge
@@ -270,11 +267,7 @@ const DISABLE_TAB_INDEX = -1
270267
commandDialogOpen = false
271268
}}
272269
>
273-
<UnionIcon
274-
theme="mono"
275-
name="usertransfers"
276-
class="mr-2 size-5"
277-
/>
270+
<UserTransfersIcon class="mr-2 size-5"/>
278271
<span>Your transfers</span>
279272
{#if $page.route.id?.startsWith('/explorer/address')}
280273
<Badge
@@ -300,11 +293,7 @@ const DISABLE_TAB_INDEX = -1
300293
commandDialogOpen = false
301294
}}
302295
>
303-
<UnionIcon
304-
theme="mono"
305-
name="channel"
306-
class="mr-2 size-5"
307-
/>
296+
<ChannelIcon class="mr-2 size-5"/>
308297
<span>All transfers</span>
309298
{#if $page.route.id?.startsWith('/explorer/transfers')}
310299
<Badge
@@ -330,11 +319,7 @@ const DISABLE_TAB_INDEX = -1
330319
commandDialogOpen = false
331320
}}
332321
>
333-
<UnionIcon
334-
theme="mono"
335-
name="ibcconnections"
336-
class="mr-2 size-5"
337-
/>
322+
<IbcConnectionsIcon class="mr-2 size-5"/>
338323
<span>IBC connections</span>
339324
{#if $page.route.id?.startsWith('/explorer/connections')}
340325
<Badge
@@ -361,11 +346,7 @@ const DISABLE_TAB_INDEX = -1
361346
commandDialogOpen = false
362347
}}
363348
>
364-
<UnionIcon
365-
theme="mono"
366-
name="ibcchannels"
367-
class="mr-2 size-5"
368-
/>
349+
<IbcChannelsIcon class="mr-2 size-5" />
369350
<span>IBC channels</span>
370351
{#if $page.route.id?.startsWith('/explorer/channels')}
371352
<Badge
@@ -392,11 +373,7 @@ const DISABLE_TAB_INDEX = -1
392373
commandDialogOpen = false
393374
}}
394375
>
395-
<UnionIcon
396-
theme="mono"
397-
name="hubblestatus"
398-
class="mr-2 size-5"
399-
/>
376+
<HubbleStatusIcon class="mr-2 size-5" />
400377
<span>Hubble index status</span>
401378
{#if $page.route.id?.startsWith('/explorer/index-status')}
402379
<Badge

app/src/lib/components/union-icons/index.svelte

-22
This file was deleted.

app/src/lib/components/union-icons/union-icons.ts

-204
This file was deleted.

app/src/routes/explorer/+layout.ts

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import type { LayoutLoad } from "./$types.ts"
2-
import { UnionIcons } from "$lib/components/union-icons/union-icons.ts"
2+
import IndexIcon from "$lib/components/union-icons/color/icon-index-color.svelte"
3+
import ChannelsIcon from "$lib/components/union-icons/color/icon-channel-color.svelte"
4+
import TransfersIcon from "$lib/components/union-icons/color/icon-transfers-color.svelte"
5+
import ConnectionIcon from "$lib/components/union-icons/color/icon-connection-color.svelte"
6+
import PacketIcon from "$lib/components/union-icons/color/icon-packet-color.svelte"
37

48
const tables = ["channels", "transfers", "packets", "connections", "index-status"] as const
59

610
export interface Table {
711
route: (typeof tables)[number]
8-
icon: typeof UnionIcons.transfers.variants.color
12+
icon: typeof IndexIcon
913
description: string
1014
}
1115

@@ -14,27 +18,27 @@ export const load = (loadEvent => ({
1418
tables: [
1519
{
1620
route: "transfers",
17-
icon: UnionIcons.transfers.variants.color,
21+
icon: TransfersIcon,
1822
description: "All transfers"
1923
},
2024
{
2125
route: "packets",
22-
icon: UnionIcons.packet.variants.color,
26+
icon: PacketIcon,
2327
description: "All packets"
2428
},
2529
{
2630
route: "connections",
27-
icon: UnionIcons.connection.variants.color,
31+
icon: ConnectionIcon,
2832
description: "Confirmed IBC Connections based on on-chain four-way handshake events."
2933
},
3034
{
3135
route: "channels",
32-
icon: UnionIcons.channel.variants.color,
36+
icon: ChannelsIcon,
3337
description: "Open IBC Channels"
3438
},
3539
{
3640
route: "index-status",
37-
icon: UnionIcons.index.variants.color,
41+
icon: IndexIcon,
3842
description: "Statuses of Hubble indices for connected chains"
3943
}
4044
] as const satisfies Array<Table>

0 commit comments

Comments
 (0)