Repository navigation
fix(sidebar): keep the earned reputation chip from pushing Cores out of the profile menu - #7542
Merged
Merged
Conversation
…of the profile menu With a large reputation and Cores balance, the +N chip made the stats strip wider than the 196px it has in the profile panel, and the strip's overflow-hidden cut off the Cores number (user feedback c1c566e9). The chip now uses the same short format as the counts (+1.2K, not +1,250), and the cells use px-2/gap-1 instead of px-3/gap-1.5. With 104K reputation, +120 and 9.9K Cores the strip needs 186px (was 208px); 999K / +9.9K / 999K needs 195px (was 221px).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Problem
In the profile menu, the earned reputation chip (#7523) can make the reputation and Cores strip wider than the panel allows. With a large reputation, a large Cores balance and a gain, the strip's
overflow-hiddencuts off the Cores number (for example 104K reputation, +120 earned, 9.9K Cores). This came in through user feedback.Fix
ReputationEarnedChipuseslargeNumberFormat, the same short format as the counts:+1.2Kinstead of+1,250. This applies to both the profile menu chip and the "+N reputation" chip on notifications.SidebarProfileStatscells usegap-1 px-2instead ofgap-1.5 px-3.Measured
I rendered the real component in Storybook inside the profile panel (
w-60,pl-5 pr-6, a 196px strip). The browser used a fallback font (Helvetica/Arial):Tests
SidebarProfileStats.spec: a big gain shows as+1.2K.pnpm --filter webapp testpasses (712 tests).🤖 Generated with Smith
Preview domain
https://fix-reputation-chip-overflow.preview.app.daily.dev