Skip to content

fix(header): normalize streak, cores, and reputation buttons#6097

Open
tsahimatsliah wants to merge 10 commits into
mainfrom
claude/ecstatic-dirac-678fac
Open

fix(header): normalize streak, cores, and reputation buttons#6097
tsahimatsliah wants to merge 10 commits into
mainfrom
claude/ecstatic-dirac-678fac

Conversation

@tsahimatsliah
Copy link
Copy Markdown
Member

@tsahimatsliah tsahimatsliah commented May 25, 2026

Summary

The three stat buttons inside the profile pill in the header (streak, cores, reputation) were rendered with three different patterns. This commit aligns them so they read as one consistent control.

Before the three buttons differed in:

  • Typography — reputation used typo-subhead; cores/streak used typo-footnote.
  • Icon size — reputation forced IconSize.Small; the others used the size inherited from ButtonSize.Small.
  • Number color — streak's number was painted text-accent-bacon-default; reputation/cores used the default text color.
  • Background — on desktop, the streak button rendered with ButtonVariant.Float while sitting inside a bg-surface-float pill, which doubled the surface.
  • Markup — reputation was a hand-rolled <button> wrapping ReputationUserBadge plus the avatar; the others used the shared Button component.

After all three are Button with variant=Tertiary + size=Small, default icon size, default text color, and the avatar is its own dedicated clickable trigger for the profile menu.

Test plan

  • Open the webapp header while logged in and confirm streak, cores, and reputation numbers share the same font, size, and color.
  • Confirm the three icons render at the same visual size.
  • Click each button: streak opens the streak popup, cores navigates to wallet, reputation opens the profile menu, avatar opens the profile menu.
  • Trigger a reputation/cores reward animation and confirm the scale pulse still plays on the new wrapper.
  • Resize across breakpoints (mobile / laptop / desktop) and confirm the layout still works.

🤖 Generated with Claude Code

Preview domain

https://claude-ecstatic-dirac-678fac.preview.app.daily.dev

Align all three header stat buttons inside the profile pill on the same
Button size/variant, icon size, typography, and number color so the
group reads as one consistent control.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview May 26, 2026 8:55am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored May 26, 2026 8:55am

Request Review

Pre-existing strict violations (optional auth user, ConditionalWrapper
wrapper type, ReactElement vs null return, Button props union) live on
lines untouched by this PR and should be addressed in a dedicated
cleanup PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop the streak-only `pl-4` override so all three pill buttons share
the same `pl-1.5 pr-3` from ButtonSize.Small. Shrink the compact
streak icon to IconSize.XSmall so its full-bleed glyph visually
matches the padded reputation and core icons. Update the profile-button
spec to assert the accessible button by role instead of relying on
the Radix tooltip's duplicated aria-label.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Keep the streak glyph rendered at XSmall (20px) but center it inside
a 24x24 wrapper so its flex bounding box matches the cores and
reputation icons. The Button's gap-1 now produces the same spatial
gap between icon and number across all three buttons.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ButtonSize.Small with a left icon defaults to pl-1.5 pr-3 (6/12), so
the right edge of each button reads as more padded than the left.
Override to !px-2 on streak, cores, and reputation so all three share
the same 8px left/right inner padding.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop the inner padding on streak, cores, and reputation from
!px-2 (8/8) to !px-1.5 (6/6). Both sides stay equal and the
buttons now hug their icon/number more tightly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ReputationIcon (FilledIcon, viewBox 16x17) renders with ~4px of
internal padding on each side when scaled to 24px, so identical
button padding still left reputation looking more inset on the
left than streak and cores. Use !pl-0.5 (2px) so the visible icon
edge lands at the same horizontal position as cores'.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant