feat: introduce RowLink primitive and migrate leaderboard (#266)#269
Merged
anderdc merged 2 commits intoentrius:testfrom Apr 15, 2026
Merged
Conversation
Contributor
Author
|
@anderdc Please review my PR asap. I appreciate. |
12 tasks
anderdc
previously approved these changes
Apr 15, 2026
Collaborator
anderdc
left a comment
There was a problem hiding this comment.
Good fix — proper link semantics for miner cards. Needs CI to pass (no checks have run yet). Push or retrigger to get build/format results.
Collaborator
|
fix ci |
Contributor
Author
|
Hi @anderdc I have just fixed CI error. |
7 tasks
anderdc
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces a shared
RowLinkprimitive that renders clickable list rows as real<a href>elements, and migrates the Leaderboard surface (TopMinersTablerows +MinerCard) to use it. Middle-click, Cmd/Ctrl-click, and right-click "Open link in new tab" now all work on the Top Miners and Discoveries pages.What changed
New primitive —
src/components/common/RowLink.tsxA thin
<a href>wrapper that:preventDefault()andnavigate(href, { state })so React Router handles the transition (no full page reload, back-stack preserved, same UX as today)defaultPreventedso nested clickable elements (copy buttons, inline links) keep working when theye.stopPropagation()Migrations
MinerCard: replacedonClick: () => voidprop withhref+linkState. Wraps the card body in<RowLink>.TopMinersTable: replacedonSelectMinerwith agetHref(miner)prop and optionallinkState. Every row (desktop + mobile card) is now aRowLink.TopMinersPageandDiscoveriesPage: drop theirhandleSelectMinercallbacks; pass a URL builder andbackLabelinlinkStateinstead.Unchanged
Motivation (from #266)
Rows built with
onClick + useNavigate()silently break every browser-native navigation idiom users expect from a list of links: middle-click, Cmd-click, right-click "Open in new tab", drag-to-bookmark. Fixing this with customonAuxClick+ modifier handlers only covers middle- and Cmd-click — the right-click context menu only surfaces "Open link in new tab" when the element is a real<a>. So the primitive is the right abstraction.Scope
Intentionally limited to the Leaderboard surface for this PR. The other ~14 surfaces called out in #266 (Dashboard, Repositories page, Repository detail tabs, Miner detail tabs, PR detail header, Bounties, Search) will follow as individual PRs using the same primitive — each small and independently reviewable.
Type of Change
Testing
npm run buildnpm run lint:fix/top-miners:Back to Leaderboard✓/top-miners?mode=discoveryand/discoveries— same four behaviors; detail page opens withmode=issues, back label isBack to Discoveries.e.stopPropagation()).Checklist
getMinerHref/linkStatepart of the issue)Follow-ups (out of scope)
One PR per surface:
LeaderboardSidebar(discoveries sidebar on XL viewports)Media to upload
14.04.2026_22.33.02_REC_266.mp4
Fixes #266