fix(ui): give the per-UID yield leaderboard a mobile card layout#4836
fix(ui): give the per-UID yield leaderboard a mobile card layout#4836jeffrey701 wants to merge 1 commit into
Conversation
The 7-column yield leaderboard table overflows the mobile viewport inside its overflow-hidden card, clipping its two rightmost columns — Yield % and the vs-median indicator, the entire point of a ranked-yield page. The overflow-x-auto wrapper makes it technically scrollable, but the default mobile view still hides yield/vs-median behind an undiscoverable scroll. Below md, re-flow each row into a stacked card that surfaces yield + vs-median per UID (mirrors the cards/table split ListShell already uses); at md+ the existing table is unchanged. Only a < md presentation change — no columns, data, or sorting touched. Closes JSONbored#3935
|
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 #4836 +/- ##
=======================================
Coverage 97.76% 97.76%
=======================================
Files 162 162
Lines 19004 19004
Branches 7122 7122
=======================================
Hits 18579 18579
Misses 59 59
Partials 366 366 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-11 07:56:08 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 2 non-blocking
Review context
Contributor next steps
Signal definitions
Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|


Summary
The per-UID Yield leaderboard (
yield-panel.tsx, Metagraph tab) renders a 7-column table (UID / Hotkey / Role / Stake / Emission / Yield / vs median) inside anoverflow-hiddencard. At mobile width the table is wider than the viewport, so its two rightmost columns — Yield % and the vs-median indicator, the entire point of a ranked yield page — are clipped off-screen. The table sits in anoverflow-x-autowrapper, so it is technically scrollable, but the default (unscrolled) mobile view still hides yield/vs-median behind an undiscoverable horizontal scroll (#3708).This re-flows each row into a stacked card below
mdthat surfaces yield + vs-median prominently per UID, mirroring the same cards-below-md/ table-at-md+ splitListShellalready uses for the app's paginated leaderboards (and the merged stake-transfer leaderboard fix). Atmdand up the existing table is unchanged — it comfortably fits its 7 columns at ≥768px.What changed
apps/ui/src/components/metagraphed/yield-panel.tsx— the leaderboard block only: added amd:hiddencard list (UID + role badge, yield % + vs-median arrow top-right, hotkey + stake·emission below) alongside the existing table, now wrappedhidden md:block. No columns, data, sorting,TOP_N, or theoverflow-x-autotable fallback changed — a< md-only presentation change.Screenshots
Captured on
/subnets/64?tab=metagraph(per-UID yield leaderboard) with a fixture matching the realSubnetYieldcontract shape driving the actual component code (the live/api/v1/subnets/{netuid}/yieldreturns an empty neuron set in this environment, same approach as the merged stake-transfer fix). Fixed viewports (Mobile 375×812, Tablet 768×1024, Desktop 1280×800), both themes forced vialocalStorage.setItem("mg-theme", …),deviceScaleFactor: 1.The change is scoped to
< md, so the Mobile rows carry the fix (before: table clipped at Emission, Yield/vs-median gone → after: cards surfacing yield + vs-median per UID). Tablet/Desktop keep the identical table and are included for the full matrix (before = after there).before
after (table unchanged)
before
after (table unchanged)
before
after (table unchanged)
before
after (table unchanged)
before — Yield / vs-median clipped
after — cards surface yield + vs-median
before — Yield / vs-median clipped
after — cards surface yield + vs-median
Validation
tsc --noEmit— clean (after buildingpackages/client, as CI does)eslint— 0 errors on the changed fileprettier --check— cleanvitest run— yield-format + yield-percentile-layout suites pass (15 tests)git difftouches onlyyield-panel.tsx; no columns/data/logic changed, only the< mdpresentation.Closes #3935