Fix truncated stat labels in Hackathon Leaderboard#312
Open
gregv wants to merge 1 commit into
Open
Conversation
The "General Statistics" cards clipped labels like "GitHub Commits", "Pull Requests", and "Contributors" in narrow column layouts. The horizontal card layout (icon beside number+label) gave the label box too little width; it overflowed the card and was clipped by overflow:hidden, and StatLabel's nowrap+ellipsis truncated it. - StatLabel: drop nowrap/overflow/ellipsis, add overflowWrap:break-word so labels wrap instead of truncating. - Stat card body: stack the icon above the number+label (column layout at all breakpoints) so each label gets the full card width. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Fixes cut-off labels in the General Statistics section of the Hackathon Leaderboard (visible on
/hack/summer-2026), where labels like "GitHub Commits", "Pull Requests", and "Contributors" rendered as "GitHub Com…", "Pull Reques…", "Contributo…".Why
In narrow column layouts (e.g. the two-column event page), the stat cards are only ~130px wide. The cards used a horizontal layout (icon beside the number+label), which left the label box too little width. The label box couldn't shrink, so it overflowed the card and was clipped by
overflow:hidden— andStatLabeladditionally hadwhiteSpace:nowrap+ ellipsis, truncating the text.Changes
src/components/Hackathon/HackathonLeaderboard.js:nowrap/overflow/textOverflow:ellipsis, addedoverflowWrap:break-wordso labels wrap instead of truncate.Reviewer notes
ImpactMetrics, so the readability improvement applies anywhere the leaderboard/impact tiles appear.🤖 Generated with Claude Code