Skip to content

Commit 1018419

Browse files
NateIsernclaude
andcommitted
refactor(ui): de-chip the explorer — flatten pills to plain text / status marks
The UI was pill-heavy everywhere. Removed the noise, kept only meaningful signals, no color changes: - Redundant COUNT pills → plain muted text. Section-header counts (inputs/outputs, "N transactions", blocks/pending/masternode counts, feed hints) drop the pill background and read as a quiet number. - Redundant page-header badges removed entirely where the same value already lives in a stat tile or the global network indicator: block/blocks height, address & block tx-count, "Showing N", peers total, and the MAINNET/MCP/network chips on masternodes, fee-calculator, mcp and address-validator headers. - STATUS pills flattened to icon/dot + colored text (no filled pill): tx status (Confirmed / In mempool / Unconfirmed), block confirmations, masternode status (now a status dot), home live indicator, wfair/bridge peg tone, network-status online + per-check state. - Home-card indicators (price change %, GitHub stars, network phase, supply/stats minted %, reward split) → plain colored/muted text with their icon, no pill. Interactive segmented controls (chart period toggles) left as-is. Dropped the imports/hooks orphaned by the removals (useNetwork, Activity, Network, Database, Receipt). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 8ac6179 commit 1018419

20 files changed

Lines changed: 53 additions & 111 deletions

src/components/address-content.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,6 @@ export function AddressContent({ address }: { address: string }) {
8080
subtitle={t('subtitle')}
8181
onRefresh={() => void refetch()}
8282
isRefreshing={isFetching}
83-
action={
84-
<span className="inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-1 text-xs font-medium text-primary">
85-
<Receipt className="size-3" />
86-
{t('transactionsCount', { count: info.txCount })}
87-
</span>
88-
}
8983
/>
9084

9185
{/* Hero: balance as the confident primary figure + address identity. */}
@@ -192,7 +186,7 @@ function AddressTransactionsSection({
192186
{t('exportCsv')}
193187
</Button>
194188
) : null}
195-
<span className="rounded-full bg-muted px-2 py-0.5 text-xs font-medium tabular-nums text-muted-foreground">
189+
<span className="text-xs tabular-nums text-muted-foreground">
196190
{t('transactionsCount', { count: total })}
197191
</span>
198192
</div>

src/components/address-validator-content.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,6 @@ export function AddressValidatorContent() {
111111
<DetailHeader
112112
title={t('title')}
113113
subtitle={t('subtitle')}
114-
action={
115-
<span className="inline-flex items-center gap-1 rounded-full bg-primary/10 px-2.5 py-1 text-xs font-medium text-primary">
116-
<Wallet className="size-3" />
117-
{currentNetwork.toUpperCase()}
118-
</span>
119-
}
120114
/>
121115

122116
<SectionCard title={t('validateSection.title')} icon={ShieldCheck}>

src/components/block-content.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,6 @@ export function BlockContent({ hashOrHeight }: { hashOrHeight: string }) {
8787
subtitle={t('details')}
8888
onRefresh={() => void refetch()}
8989
isRefreshing={isFetching}
90-
action={
91-
<span className="inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-1 text-xs font-medium text-primary">
92-
<Database className="size-3" />
93-
{common('transactions')}: {formatNumber(txCount)}
94-
</span>
95-
}
9690
/>
9791

9892
{/* Hero: block height + hash as the confident primary identity. */}
@@ -199,7 +193,7 @@ export function BlockContent({ hashOrHeight }: { hashOrHeight: string }) {
199193
icon={Receipt}
200194
flush
201195
action={
202-
<span className="rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium tabular-nums text-primary">
196+
<span className="text-xs tabular-nums text-muted-foreground">
203197
{formatNumber(txCount)} {common('transactions')}
204198
</span>
205199
}
@@ -226,11 +220,11 @@ function ConfirmationPill({
226220
return (
227221
<span
228222
className={cn(
229-
'inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium tabular-nums',
230-
confirmed ? 'bg-primary/10 text-primary' : 'bg-muted text-muted-foreground',
223+
'inline-flex items-center gap-1 text-xs font-medium tabular-nums',
224+
confirmed ? 'text-primary' : 'text-muted-foreground',
231225
)}
232226
>
233-
<CheckCircle2 className="size-3" />
227+
<CheckCircle2 className="size-3.5" />
234228
{formatNumber(confirmations)} {label}
235229
</span>
236230
)

src/components/blocks-content.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
AlertTriangle,
44
Blocks as BlocksIcon,
55
Calendar,
6-
Database,
76
Layers,
87
Network,
98
Search,
@@ -122,12 +121,6 @@ export function BlocksContent() {
122121
subtitle={t('subtitle')}
123122
onRefresh={() => void refetch()}
124123
isRefreshing={isFetching}
125-
badge={
126-
<span className="inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-1 text-xs font-medium text-primary">
127-
<Database className="size-3" />
128-
{t('height', { height: formatNumber(height) })}
129-
</span>
130-
}
131124
/>
132125

133126
{/* Summary tiles — same language as the home stat strip. */}
@@ -190,7 +183,7 @@ export function BlocksContent() {
190183
icon={BlocksIcon}
191184
flush
192185
action={
193-
<span className="rounded-full bg-muted px-2 py-0.5 text-xs font-medium tabular-nums text-muted-foreground">
186+
<span className="text-xs tabular-nums text-muted-foreground">
194187
{t('blocksCount', { count: filteredBlocks.length })}
195188
</span>
196189
}

src/components/bridge-content.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ export function BridgeContent() {
120120
const pegBadge = (
121121
<span
122122
className={cn(
123-
'inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-xs font-medium',
124-
peg.tone === 'healthy' && 'bg-primary/10 text-primary',
125-
peg.tone === 'unhealthy' && 'bg-destructive/10 text-destructive',
126-
peg.tone === 'pending' && 'bg-muted/70 text-muted-foreground',
123+
'inline-flex items-center gap-1 text-xs font-medium',
124+
peg.tone === 'healthy' && 'text-primary',
125+
peg.tone === 'unhealthy' && 'text-destructive',
126+
peg.tone === 'pending' && 'text-muted-foreground',
127127
)}
128128
>
129129
<peg.icon className="size-3.5" />

src/components/fee-calculator-content.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,6 @@ export function FeeCalculatorContent() {
9191
<DetailHeader
9292
title={t('title')}
9393
subtitle={t('subtitle')}
94-
action={
95-
<span className="inline-flex items-center gap-1 rounded-full bg-primary/10 px-2.5 py-1 text-xs font-medium text-primary">
96-
<Calculator className="size-3" />
97-
{currentNetwork.toUpperCase()}
98-
</span>
99-
}
10094
/>
10195

10296
<div className="grid gap-4 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.15fr)]">

src/components/home/github-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function GithubCard() {
3535

3636
const action =
3737
stars !== null ? (
38-
<span className="inline-flex items-center gap-1 rounded-full bg-muted/70 px-2 py-0.5 text-xs font-medium tabular-nums">
38+
<span className="inline-flex items-center gap-1 text-xs font-medium tabular-nums text-muted-foreground">
3939
<Star className="size-3" />
4040
{formatCompactNumber(stars)}
4141
</span>

src/components/home/home-header.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ function LivePill({ mode, phase, height, label }: LivePillProps) {
4545
return (
4646
<span
4747
className={cn(
48-
'inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium',
49-
mode === 'live' && 'bg-primary/10 text-primary',
50-
mode === 'polling' && 'bg-amber-500/10 text-amber-700 dark:text-amber-400',
51-
mode === 'offline' && 'bg-destructive/10 text-destructive',
48+
'inline-flex items-center gap-1.5 text-xs font-medium',
49+
mode === 'live' && 'text-primary',
50+
mode === 'polling' && 'text-amber-700 dark:text-amber-400',
51+
mode === 'offline' && 'text-destructive',
5252
)}
5353
>
5454
<span

src/components/home/network-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function NetworkCard() {
1515
const nextPhase = phase === 'PoW' ? 'PoS' : null
1616

1717
const action = phase ? (
18-
<span className="inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary">
18+
<span className="inline-flex items-center gap-1 text-xs font-medium text-primary">
1919
{phase}
2020
{nextPhase && (
2121
<>

src/components/home/price-card.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ export function PriceCard() {
7171
change !== null ? (
7272
<span
7373
className={cn(
74-
'inline-flex items-center gap-0.5 rounded-full px-2 py-0.5 text-xs font-medium tabular-nums',
75-
isUp ? 'bg-primary/10 text-primary' : 'bg-destructive/10 text-destructive',
74+
'inline-flex items-center gap-0.5 text-xs font-medium tabular-nums',
75+
isUp ? 'text-primary' : 'text-destructive',
7676
)}
7777
>
7878
{isUp ? <TrendingUp className="size-3" /> : <TrendingDown className="size-3" />}

0 commit comments

Comments
 (0)