From 760bc9b82cca3662a8d3f34c8dc44bb67813cb33 Mon Sep 17 00:00:00 2001 From: SkateSpots Date: Sat, 26 Sep 2026 18:54:55 +0700 Subject: [PATCH] =?UTF-8?q?fix(ux):=20Batch=20F=20part=203=20=E2=80=94=20b?= =?UTF-8?q?ounty=20ranks,=20Lab=20tab=20grid,=20contacts=20search?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Bounty leaderboards no longer slice to top 50 before computing the current user's rank (anyone outside the top 50 never saw their position), and each row no longer prints the count twice - Lab craft tabs: 4-up grid (11 tabs were laid out 5-across, leaving a lone 'Judges' orphan row); stale comment corrected - Contacts search placeholder now says it filters by npub (it never matched the displayed names) --- src/pages/BountyLeaderboardPage.tsx | 13 +++++-------- src/pages/ContactsPage.tsx | 2 +- src/pages/LabPage.tsx | 9 ++++----- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/pages/BountyLeaderboardPage.tsx b/src/pages/BountyLeaderboardPage.tsx index c5712f9..e457320 100644 --- a/src/pages/BountyLeaderboardPage.tsx +++ b/src/pages/BountyLeaderboardPage.tsx @@ -100,8 +100,8 @@ function LeaderboardEntry({ You )} -

- {count} {getTypeLabel()} +

+ {getTypeLabel()}

@@ -153,8 +153,7 @@ export default function BountyLeaderboardPage() { return Object.entries(countByPubkey) .map(([pubkey, count]) => ({ pubkey, count })) - .sort((a, b) => b.count - a.count) - .slice(0, 50); + .sort((a, b) => b.count - a.count); }, [shops]); // Calculate spot leaderboard @@ -168,8 +167,7 @@ export default function BountyLeaderboardPage() { return Object.entries(countByPubkey) .map(([pubkey, count]) => ({ pubkey, count })) - .sort((a, b) => b.count - a.count) - .slice(0, 50); + .sort((a, b) => b.count - a.count); }, [spots]); // Combined leaderboard (total contributions) @@ -190,8 +188,7 @@ export default function BountyLeaderboardPage() { return Object.entries(combined) .map(([pubkey, data]) => ({ pubkey, ...data })) - .sort((a, b) => b.total - a.total) - .slice(0, 50); + .sort((a, b) => b.total - a.total); }, [shops, spots]); // Find user's rank diff --git a/src/pages/ContactsPage.tsx b/src/pages/ContactsPage.tsx index f4ec28f..1264cb4 100644 --- a/src/pages/ContactsPage.tsx +++ b/src/pages/ContactsPage.tsx @@ -240,7 +240,7 @@ export default function ContactsPage() { type="text" value={query} onChange={(e) => setQuery(e.target.value)} - placeholder="Paste an npub to filter…" + placeholder="Filter by npub…" className="h-10 w-full rounded-xl border border-white/10 bg-white/5 pl-9 pr-9 text-sm text-white placeholder:text-gray-600 focus:border-teal-500/50 focus:outline-none" /> {query && ( diff --git a/src/pages/LabPage.tsx b/src/pages/LabPage.tsx index 0e936c5..2338e2b 100644 --- a/src/pages/LabPage.tsx +++ b/src/pages/LabPage.tsx @@ -448,11 +448,10 @@ function LabToolbar({ return (
{/* Tab row — a wrapping grid so every craft is visible at a glance with - no horizontal scrolling. 10 crafts lay out as two tidy rows of five on - phones, and flex to a single line on wide screens. Icon-over-label - stack keeps each tab compact but tappable; a count badge floats in - the corner. */} -
+ no horizontal scrolling. 11 crafts lay out 4-4-3 on phones, and flex + to a single line on wide screens. Icon-over-label stack keeps each tab + compact but tappable; a count badge floats in the corner. */} +
{tabs.map(({ key, label, icon: Icon }) => { const isActive = serviceType === key; const a = ACCENT[key];