Present card upvotes as a display-only stat, not an upvote button#494
Merged
soyalejolopez merged 1 commit intoJul 22, 2026
Conversation
Upvotes are backed by GitHub Discussion reactions (giscus on the detail page), so the count on cards is display-only. The up-chevron icon made it look like an inline upvote control, and .compact-votes was missing the muted styling .compact-views has, so the number rendered darker/bolder. Swap the chevron for a muted heart-outline metric icon and share the muted stat styling so upvotes read like the views count. Clicking still opens the detail page where giscus voting lives. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
🛰️ PR Sweeper reportRisk: 🟢 LOW · Security gate: ✅ passing · Files: 1 🔒 Automated guardrails (authoritative)
🤖 Dual-model AI review (advisory)Deep-reasoning reviewer —
|
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
Makes the resource-card upvote count read as a passive stat (like the views count) instead of looking like an inline upvote button.
Why
In the current design, upvotes are backed by GitHub Discussion reactions (giscus on the detail page) —
hasUpvotes = hasDiscussionand the count comes from server-side stats. So the number shown on cards is display-only; real upvoting happens via giscus after opening a resource. Two things made the card count misleadingly look like a clickable upvote control:.compact-votes(list view) was missing the muted styling that.compact-viewshas, so the number rendered in the default darker/bolder text.Users clicked it expecting to upvote; instead it opened the detail page and nothing "saved."
Fix
.compact-viewsand.compact-votesso the upvote count matches the views count exactly (color, size, mono font).Clicking the card still opens the detail page, where giscus voting lives. Real voting is unchanged.
Verification
Verified in a real browser (headless Chromium):
Single-file change:
index.html(+3 / -3).