From a8529fe5ec1aeee37d3e180a55d3a40f9024bc9e Mon Sep 17 00:00:00 2001 From: bitfathers94 <237535319+bitfathers94@users.noreply.github.com> Date: Sat, 25 Jul 2026 23:18:07 +0000 Subject: [PATCH] fix(ui): swap raw Bone & Ink one-off values for design tokens in batch 5/5 Converts the remaining no-restricted-syntax violations (arbitrary text-[Npx] sizes, one raw spacing step, a hand-rolled card shell, and a raw ) across 12 of the 13 files in this batch to the matching primitive/token, no visual/behavioral change intended: - Plain-sans micro text (9-11.5px, no font-mono) snaps to mg-type-caption (12px) -- the smallest sans step on the scale; there's no sub-12px sans token, so this is a sub-2px size normalization, same tolerance already established for the 12/13px caption band itself. - subnets-highlights.tsx's one 15px value gets an exact-match inline style against the already-defined-but-unconsumed --mg-type-body-lg var, rather than approximating. - take-management-modal.tsx's direction-toggle segmented control now wraps in , with the flex layout moved to bodyClassName so the buttons stay direct flex children instead of nesting under Panel's own padding wrapper. - wallet-connect.tsx's wallet-picker link now uses from @jsonbored/ui-kit instead of a hand-rolled + safeExternalUrl call. validators-compare-drawer.tsx's 3 sticky-cell z-[1]/z-[2] values are deliberately left as-is -- CONTRIBUTING.md documents this exact file's sticky corner cell as the one standing exception to the --mg-z-* scale (local table stacking context, not a global layer), and its sibling subnets-compare-drawer.tsx carries the identical untouched pattern. Converting it would fight the documented intent for no real benefit. Closes #8171. --- .../metagraphed/subnets-highlights.tsx | 9 ++- .../metagraphed/surface-fixture.tsx | 8 ++- .../components/metagraphed/table-controls.tsx | 6 +- .../metagraphed/take-management-modal.tsx | 17 +++--- .../metagraphed/validator-apy-panel.tsx | 6 +- .../metagraphed/validator-card-list.tsx | 2 +- .../metagraphed/validator-guide.tsx | 8 +-- .../metagraphed/verify-surface-button.tsx | 2 +- .../components/metagraphed/wallet-connect.tsx | 57 +++++++------------ .../metagraphed/watch-alert-form.tsx | 2 +- .../webhook-subscription-manager.tsx | 12 ++-- .../metagraphed/your-positions-panel.tsx | 6 +- 12 files changed, 67 insertions(+), 68 deletions(-) diff --git a/apps/ui/src/components/metagraphed/subnets-highlights.tsx b/apps/ui/src/components/metagraphed/subnets-highlights.tsx index aff8e79758..6dd6d97e0f 100644 --- a/apps/ui/src/components/metagraphed/subnets-highlights.tsx +++ b/apps/ui/src/components/metagraphed/subnets-highlights.tsx @@ -74,8 +74,13 @@ function Card({
{eyebrow}
-
{value}
- {hint ?
{hint}
: null} +
+ {value} +
+ {hint ?
{hint}
: null}
{open ? (
- {isLoading ? Loading sample… : null} + {isLoading ? ( + Loading sample… + ) : null} {isError ? ( - Sample unavailable right now. + Sample unavailable right now. ) : null} {fixture ? ( <> @@ -91,7 +93,7 @@ export function SurfaceFixture({ {bodyText} ) : ( - Empty response body. + Empty response body. )}
diff --git a/apps/ui/src/components/metagraphed/table-controls.tsx b/apps/ui/src/components/metagraphed/table-controls.tsx index 7f8e9d9f2e..1b5ee233da 100644 --- a/apps/ui/src/components/metagraphed/table-controls.tsx +++ b/apps/ui/src/components/metagraphed/table-controls.tsx @@ -105,7 +105,7 @@ export function SearchInput({ // the aria-labelled sibling controls (SortButton, PageSizeSelect) in this file. aria-label={placeholder ?? "Search"} className={classNames( - "w-full rounded border border-border bg-paper pl-8 pr-14 py-1.5 text-sm text-ink-strong", + "w-full rounded border border-border bg-paper pl-8 pr-16 py-1.5 text-sm text-ink-strong", "placeholder:text-ink-muted focus:outline-none focus:border-accent/50 focus:ring-2 focus:ring-ring transition-colors", )} /> @@ -298,8 +298,8 @@ export function ResetFiltersButton({ onClick={onReset} className={ bare - ? "inline-flex items-center gap-1 rounded px-2 py-1 min-h-8 text-[11px] font-medium text-ink-muted hover:text-ink-strong hover:bg-surface transition-colors" - : "inline-flex items-center gap-1 rounded border border-border bg-card px-2 py-1 text-[11px] font-medium text-ink hover:border-ink/30 min-h-7" + ? "inline-flex items-center gap-1 rounded px-2 py-1 min-h-8 mg-type-caption font-medium text-ink-muted hover:text-ink-strong hover:bg-surface transition-colors" + : "inline-flex items-center gap-1 rounded border border-border bg-card px-2 py-1 mg-type-caption font-medium text-ink hover:border-ink/30 min-h-7" } title="Clear search, filters, and pagination" > diff --git a/apps/ui/src/components/metagraphed/take-management-modal.tsx b/apps/ui/src/components/metagraphed/take-management-modal.tsx index d088639e51..5e99207365 100644 --- a/apps/ui/src/components/metagraphed/take-management-modal.tsx +++ b/apps/ui/src/components/metagraphed/take-management-modal.tsx @@ -19,6 +19,7 @@ import { } from "@jsonbored/ui-kit"; import { WalletConnectPanel } from "@/components/metagraphed/wallet-connect"; import { SearchInput } from "@/components/metagraphed/table-controls"; +import { Panel } from "@/components/metagraphed/primitives"; import { shortHash } from "@/lib/metagraphed/blocks"; import { classNames } from "@/lib/metagraphed/format"; import { broadcastStatusLabel } from "@/components/metagraphed/stake-unstake-modal"; @@ -202,10 +203,12 @@ function TakeAmountStep({ flow }: { flow: UseTakeFlowResult }) { return (
-
{DIRECTIONS.map((d) => { const active = d === flow.direction; @@ -225,7 +228,7 @@ function TakeAmountStep({ flow }: { flow: UseTakeFlowResult }) { ); })} -
+
-
+
Current take
{flow.currentTakePct != null ? `${flow.currentTakePct.toFixed(2)}%` : "—"} @@ -327,7 +330,7 @@ function TakeConfirmationStep({ loading={flow.feeTao === null} /> -
+
@@ -70,7 +70,7 @@ export function ValidatorApyPanel({ ))}
{!anyLoading && !anyValue ? ( -

+

APY estimates need stake and emission history — they appear once enough daily snapshots exist for this validator.

@@ -80,7 +80,7 @@ export function ValidatorApyPanel({ windowLabel="history windows" stakeRisk /> -

+

Delegator APY annualizes the latest daily rewards-per-1k-τ rate from neuron_daily, net of validator take. Snapshot-tier emission can lag; server-side modelling (#2551) will replace this client estimate. diff --git a/apps/ui/src/components/metagraphed/validator-card-list.tsx b/apps/ui/src/components/metagraphed/validator-card-list.tsx index 8db0249ef0..e896bcfb25 100644 --- a/apps/ui/src/components/metagraphed/validator-card-list.tsx +++ b/apps/ui/src/components/metagraphed/validator-card-list.tsx @@ -52,7 +52,7 @@ export function ValidatorCardList({ validators, className }: ValidatorCardListPr {/* Same AccountAddress hover-card treatment as the desktop column (#6338). */}

-
+
diff --git a/apps/ui/src/components/metagraphed/validator-guide.tsx b/apps/ui/src/components/metagraphed/validator-guide.tsx index e94b4cf8c3..cf23b3c2d8 100644 --- a/apps/ui/src/components/metagraphed/validator-guide.tsx +++ b/apps/ui/src/components/metagraphed/validator-guide.tsx @@ -88,7 +88,7 @@ export function ValidatorGuide() { {open ? (
-
+
{METRICS.map((m) => (
{m.term}
@@ -96,7 +96,7 @@ export function ValidatorGuide() {
))}
-

+

{GUIDANCE}

@@ -119,11 +119,11 @@ export function ValidatorGuide() { {m.term} -

{m.def}

+

{m.def}

))}
-

+

{GUIDANCE}

diff --git a/apps/ui/src/components/metagraphed/verify-surface-button.tsx b/apps/ui/src/components/metagraphed/verify-surface-button.tsx index 7141e43239..8f55331abc 100644 --- a/apps/ui/src/components/metagraphed/verify-surface-button.tsx +++ b/apps/ui/src/components/metagraphed/verify-surface-button.tsx @@ -28,7 +28,7 @@ export function VerifySurfaceButton({ surfaceId }: { surfaceId: string }) { const rateLimited = mutation.error instanceof ApiError && mutation.error.status === 429; return ( -
+
-

+

diff --git a/apps/ui/src/components/metagraphed/watch-alert-form.tsx b/apps/ui/src/components/metagraphed/watch-alert-form.tsx index 8973fe54a0..140d4ff80d 100644 --- a/apps/ui/src/components/metagraphed/watch-alert-form.tsx +++ b/apps/ui/src/components/metagraphed/watch-alert-form.tsx @@ -60,7 +60,7 @@ export function Field({ {required ? * : null} {children} - {hint ? {hint} : null} + {hint ? {hint} : null} ); } diff --git a/apps/ui/src/components/metagraphed/webhook-subscription-manager.tsx b/apps/ui/src/components/metagraphed/webhook-subscription-manager.tsx index 1d3243d7c8..7d6d245524 100644 --- a/apps/ui/src/components/metagraphed/webhook-subscription-manager.tsx +++ b/apps/ui/src/components/metagraphed/webhook-subscription-manager.tsx @@ -203,7 +203,7 @@ function CreateSubscriptionSection() { className={inputCls} /> {netuidsError ? ( -

{netuidsError}

+

{netuidsError}

) : null} @@ -234,7 +234,9 @@ function CreateSubscriptionSection() { }} className={inputCls} /> - {secretError ?

{secretError}

: null} + {secretError ? ( +

{secretError}

+ ) : null}