Skip to content

Present card upvotes as a display-only stat, not an upvote button#494

Merged
soyalejolopez merged 1 commit into
microsoft:masterfrom
soyalejolopez:alejanl-microsoft-upvote-display-stat
Jul 22, 2026
Merged

Present card upvotes as a display-only stat, not an upvote button#494
soyalejolopez merged 1 commit into
microsoft:masterfrom
soyalejolopez:alejanl-microsoft-upvote-display-stat

Conversation

@soyalejolopez

Copy link
Copy Markdown
Member

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 = hasDiscussion and 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:

  1. The up-chevron icon universally reads as an "upvote" affordance (Reddit/HN/StackOverflow).
  2. .compact-votes (list view) was missing the muted styling that .compact-views has, 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

  • Swap the up-chevron for a muted heart-outline metric icon (same hollow line-icon style as the views "eye").
  • Share the muted stat styling between .compact-views and .compact-votes so 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):

  • List view: upvote count now renders in the same muted grey / 12px / mono as views; no up-chevron remains.
  • Clicking the count opens the resource detail page (where giscus reactions live).
  • No button/border/hover affordance added.

Single-file change: index.html (+3 / -3).

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>
@soyalejolopez
soyalejolopez merged commit a7606b9 into microsoft:master Jul 22, 2026
1 check passed
@soyalejolopez
soyalejolopez deleted the alejanl-microsoft-upvote-display-stat branch July 22, 2026 15:57
@github-actions

Copy link
Copy Markdown
Contributor

🛰️ PR Sweeper report

Risk: 🟢 LOW · Security gate: ✅ passing · Files: 1

🔒 Automated guardrails (authoritative)

Category Location Finding
ℹ️ scope Change(s) outside known content roots: index.html.

🤖 Dual-model AI review (advisory)

Deep-reasoning revieweropenai/o3 · verdict: approve · risk: low

Change is purely presentational—exposes vote count in compact view and updates SVG icon. No hard-coded secrets, executable code, or privacy concerns detected.

Quality notes:

  • index.html — Visual/UI update only: displays .compact-votes and swaps arrow icon for heart. No scripts or logic touched; consistent with surrounding code.

✅ Suggested next steps

  • Confirm the new SVG matches project’s visual style and is appropriately licensed.
  • Ensure any required documentation or screenshots are updated to reflect the new UI.

The automated guardrails are authoritative and gate the security status. The AI review is advisory and never auto-merges. Thanks for contributing to FastTrack! 🛩️

@github-actions github-actions Bot added sweeper:ai-reviewed PR Sweeper: dual-model AI review attached sweeper:risk-low PR Sweeper: low risk sweeper:scope-review PR Sweeper: scope/sensitive-path review labels Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sweeper:ai-reviewed PR Sweeper: dual-model AI review attached sweeper:risk-low PR Sweeper: low risk sweeper:scope-review PR Sweeper: scope/sensitive-path review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant