feat(frontend): marquee UX polish — mobile DeFi split + clickable cards#36
Merged
feat(frontend): marquee UX polish — mobile DeFi split + clickable cards#36
Conversation
Categories above 20 repos (today just DeFi at 24) render two stacked horizontally-scrolling marquees below the md breakpoint. Desktop keeps a single row unchanged. Preserves definition order via a mechanical first-half/second-half split and wraps both rows in a labelled group so screen readers still announce the section as a single unit.
The title anchor now extends its hit area over the whole card via a
CSS ::after { inset: 0 } overlay, turning the description and padding
dead zones into clickable surface. The StarIndicator is wrapped in a
relative z-10 container so the retry button escapes the overlay and
keeps its own click handler. Adds an explicit aria-label on the anchor
so screen readers announce the destination.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The marquee renders three DOM copies of each card to power the seamless
loop and parks scrollLeft in the middle copy, so the cards users see
are almost always duplicates. Those duplicates were marked
inert={true}, which blocks pointer events — the stretched-link fix
from the previous commit only worked on copy 0, which is usually off-
screen. Neither the title click nor the whole-card click fired on the
visible copies.
Replace inert with tabindex=-1 plumbed through a new focusable prop on
RepoCard. Duplicates keep aria-hidden for screen-reader dedup and stay
out of the Tab order, but the anchor and retry button once again
receive pointer events on every copy.
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.
What / why
Two UX gaps in the category browse flow shipped together:
How
Row split — a new
frontend/src/lib/split-marquee.tsexposes a pureshouldSplit(count, isDesktop)+splitInHalf(items)pair. On mobile, categories over 20 repos render two stackedRepoMarqueeinstances; desktop is untouched. Order is preserved (first-half/second-half mechanical split) so it matchesrepos.tsat a glance. A labelledrole="group"wraps the two rows so screen readers still announce the section as a single unit.Clickable card — the existing title anchor is extended via the stretched-link pattern (
::after { position: absolute; inset: 0 }) to cover the whole card. TheStarIndicatoris wrapped in arelative z-10container so the retry button escapes the overlay and keeps its own click handler. Anchor gains an explicitaria-labelso screen readers announce the destination.No schema change, no Saturn or RepoMarquee internal change, no new components. Saturn chip-highlight routing still works via the unchanged
data-repo-keyattribute on the<article>.Tests
split-marquee.test.ts(11) — threshold, even/odd, empty, order;repo-card.test.tsxextended (5) — stretched-link classes, retry escape, anchor attributes.home-mobile-defi-split.spec.ts(390 × 844 shows two rows, 1440 × 900 shows one);repo-card-clickable.spec.ts(description dead-zone opens new tab, anchor attributes).<A>anchor, retry wrapper hasposition:relative; z-index:10.Acceptance
Covers the 12 criteria in
plan/phase-defi-row-split.md. All four local reviewers (spec, security, efficiency, quality) approved; two minor quality notes (test-label rot, index-based key) addressed inline.