Skip to content

feat(home): make PR list items middle-clickable via BlockLink - #364

Merged
jennings merged 1 commit into
mainfrom
jennings/nmyrrrmqvqmk
Jul 14, 2026
Merged

feat(home): make PR list items middle-clickable via BlockLink#364
jennings merged 1 commit into
mainfrom
jennings/nmyrrrmqvqmk

Conversation

@jennings

Copy link
Copy Markdown
Owner

Home-page PR rows were rendered as <button> elements, so users could not middle-click to open a PR in a new tab. Introduce a reusable BlockLink component: BlockLink.Root wraps the clickable card and re-dispatches click events onto the nested BlockLink.Link, while BlockLink.Link renders an actual <a> (so the browser handles middle/cmd/ctrl click natively) and stops propagation to avoid firing twice. BlockLink.Link supports an asChild prop backed by a small Slot utility that spreads its props onto its only child.

The PR title on the home list is now a BlockLink.Link with the PR's canonical href, and plain left-clicks still route through the existing openPRReviewTab flow for SPA navigation.

Resolves #362

Home-page PR rows were rendered as <button> elements, so users could not
middle-click to open a PR in a new tab. Introduce a reusable BlockLink
component: BlockLink.Root wraps the clickable card and re-dispatches click
events onto the nested BlockLink.Link, while BlockLink.Link renders an
actual <a> (so the browser handles middle/cmd/ctrl click natively) and
stops propagation to avoid firing twice. BlockLink.Link supports an
asChild prop backed by a small Slot utility that spreads its props onto
its only child.

The PR title on the home list is now a BlockLink.Link with the PR's
canonical href, and plain left-clicks still route through the existing
openPRReviewTab flow for SPA navigation.

Resolves #362
@jennings
jennings merged commit d97e0de into main Jul 14, 2026
5 checks passed
@jennings
jennings deleted the jennings/nmyrrrmqvqmk branch July 14, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow middle-clicking links on the home page to open in new tabs

1 participant