fix(ui): swap raw one-off values for design tokens in metagraphed components batch 3/5#8190
Conversation
…ponents batch 3/5 (JSONbored#8169) Converts the 59 no-restricted-syntax violations across these 17 metagraphed components to the matching primitive/token, no visual/behavioral change intended: - Plain-sans micro text (10-11px, no font-mono) snaps to mg-type-caption (12px), the smallest sans step on the scale -- same sub-2px normalization tolerance already established by the batch 5/5 sweep. Mono-context sites keep their family via the mono tokens instead: mg-type-data (11px, exact) for schema-drift-detail's link and schema-drift's row list, mg-type-data-sm (10px) for the copy button and operational-panel's 9.5px mosaic/trend subtitles. - nav-omnibox's input pill and rpc-proxy's window toggle wrap in <Panel> (flush), with the flex layout moved to bodyClassName so the children stay direct flex children -- same !p-* override pattern as take-management-modal's segmented control. - gittensor-registered-repos' two repo links, nav-mega-menu-content's JSON link, network-switcher's setup link, and neuron-table's CSV download now use <ExternalLink bare> from @jsonbored/ui-kit (bare: these are custom-layout/pill links where the non-bare underline + icon treatment would visibly change them; bare still applies safeExternalUrl filtering and target/rel handling). Four sites have no matching token and carry an inline eslint-disable with justification instead of a wrong-tier swap: hero-subnet-chips' bg-card/80 (the JSONbored#7842-documented glass-tier exception already commented in-file), operational-panel's status-mosaic rounded-[2px] (CONTRIBUTING.md's documented dense-grid residual), and resource-explorer's two TooltipTrigger-asChild anchors (already safeExternalUrl-routed with a custom blocked-state fallback; ui-kit's <ExternalLink> doesn't forward the ref/hover handlers Radix's Slot injects, so swapping would break the tooltips). Closes JSONbored#8169.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8190 +/- ##
=======================================
Coverage 97.82% 97.82%
=======================================
Files 415 415
Lines 28893 28893
Branches 10850 10850
=======================================
Hits 28265 28265
Misses 141 141
Partials 487 487 🚀 New features to boost your workflow:
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-26 05:28:38 UTC
Review summary Nits — 7 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. Scroll preview
A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|


Ratchet-cleans the 59 Bone & Ink
no-restricted-syntaxviolations across 17apps/ui/src/components/metagraphed/components (batch 3/5), swapping raw one-off values for the equivalent design token/primitive with zero intended visual or behavioral change.Closes #8169
What changed, by category
.mg-type-*utilities (46 sites). Plain-sanstext-[10px]/text-[11px]snaps tomg-type-caption(12px) — the smallest sans step on the scale, the same sub-2px normalization tolerance the batch 5/5 sweep (fix(ui): swap raw Bone & Ink one-off values for design tokens in batch 5/5 #8183) established. Mono-context sites keep their family exact via the mono tokens instead:mg-type-data(11px mono, exact match) forschema-drift-detail.tsx's link andschema-drift.tsx's row list,mg-type-data-sm(10px mono) forschema-drift-detail.tsx's copy button andoperational-panel.tsx's twofont-mono text-[9.5px]subtitles.rounded border bg-cardshells →<Panel>(2 sites).nav-omnibox.tsx's input pill andrpc-proxy.tsx's 7d/30d window toggle now wrap in<Panel as="div" flush>, with the flex layout moved tobodyClassNameso the children stay direct flex children — same!p-*override pattern astake-management-modal.tsx's segmented control from batch 5/5.<a target="_blank">→<ExternalLink>from@jsonbored/ui-kit(5 sites).gittensor-registered-repos.tsx(repo rows + "View all" footer),nav-mega-menu-content.tsx(footer JSON link),network-switcher.tsx(local-dev setup link),neuron-table.tsx(CSV download, with itsstopPropagationpreserved on a wrapper span, mirroringendpoint-operational-list.tsx). All use thebarevariant: these are custom-layout/pill links where the non-bare underline + external-icon treatment would visibly change them;barestill applies thesafeExternalUrlfiltering andtarget/relhandling the rule exists for.Flagged — no matching token, left in place with an inline justified
eslint-disablehero-subnet-chips.tsx—bg-card/80: the file already carries the Design tokens 3/5: surface-translucency tiers for bg-card/NN glass surfaces #7842-documented exception comment (.mg-glasswould add unwanted blur and browser-dependent 80/95% opacity;.mg-glass-soft's 60% visibly lightens the chip). Added the disable directive under the existing comment rather than a wrong-tier swap.operational-panel.tsx— status-mosaicrounded-[2px]: CONTRIBUTING.md documents dense visualization grids (explicitly including the status mosaic) as a standing sub-token residual; every approved radius step would materially change the per-cell grid.resource-explorer.tsx— twoTooltipTrigger asChildanchors (endpoint open-icon, surface host link): both already route throughsafeExternalUrlwith a custom blocked-state fallback (including the Informative status dots/icons use aria-label without a role, so the label isn't reliably exposed to screen readers #6423role="img"a11y carrier); ui-kit's<ExternalLink>doesn't forward the ref/hover handlers Radix's Slot injects, so swapping it in would silently break the tooltips.If maintainers prefer these four to stay live warnings instead of disables (per CONTRIBUTING's "still flagged as a warning to stay visible" note for the mosaic residual), happy to drop the directives.
Gates (run from
apps/ui/)npx eslint src/components/metagraphed/<each of the 17 files>no-restricted-syntax) on every filenpx prettier --check <17 touched files>npm run typecheck(tsc --noEmit)npm run buildnpx vitest rungit diff --checkScreenshots
Captured with the repo's own capture tool (
tests/e2e/capture-pr-screenshots.ts: fixed-viewport, 3 viewports x 2 themes, before =origin/main, after = this branch). Two routes cover the touched components:/(hero-subnet-chips, nav-omnibox, network-switcher, registry-ticker, mega-menu chrome) and/subnets/74(gittensor-registered-repos, operational-panel, resource-explorer, schema-drift, neuron-table). All changes are token-equivalent swaps; the only expected visible deltas are the documented sub-2px caption normalizations (plus live API data drift between the two capture passes)./(home)before
after
before
after
before
after
before
after
before
after
before
after
/subnets/74before
after
before
after
before
after
before
after
before
after
before
after