Skip to content

Fix mobile responsiveness in LeaderboardView contributors table#745

Draft
Claude wants to merge 3 commits intomainfrom
claude/fix-leaderboard-mobile-responsiveness
Draft

Fix mobile responsiveness in LeaderboardView contributors table#745
Claude wants to merge 3 commits intomainfrom
claude/fix-leaderboard-mobile-responsiveness

Conversation

@Claude
Copy link
Copy Markdown
Contributor

@Claude Claude AI commented Apr 7, 2026

Description

The LeaderboardView contributors table was not responsive on mobile devices, with horizontal overflow and layout issues causing poor user experience on smaller screens.

What

Applied mobile-first responsive design patterns to the LeaderboardView component's contributors table mobile row.

Why

Mobile users experienced horizontal overflow in the contributors table due to activity badges not wrapping, oversized elements, and insufficient spacing constraints.

How

Mobile Row Layout Improvements:

  • Changed items-center to items-start to allow proper content wrapping
  • Reduced padding on mobile: gap-2 sm:gap-3, px-3 sm:px-4
  • Added pt-0.5 to rank column for proper vertical alignment

Responsive Sizing:

  • Rank column: w-7 sm:w-8 with icon sizing h-3.5 w-3.5 sm:h-4 sm:w-4
  • Avatar: size-8 sm:size-9 (reduced from fixed size-9)
  • Text: text-xs sm:text-sm for name, rank number, and points
  • Gap reduction: gap-1 between name and badge elements

Overflow Prevention:

  • Added flex-wrap to activity breakdown badges container to prevent horizontal overflow
  • Added min-w-0 constraint to name container for proper truncation
  • Wrapped RankChangeBadge in shrink-0 div to prevent compression
  • Made individual activity badges shrink-0 to maintain consistent sizing
  • Added mt-0.5 spacing to activity breakdown row

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • ♻️ Refactoring (no functional changes, no API changes)
  • ⚡ Performance improvement
  • ✅ Test coverage improvement
  • 🔧 Chore/maintenance

Packages Affected

  • @ohcnetwork/leaderboard-api
  • @leaderboard/plugin-runner
  • @leaderboard/plugin-dummy
  • create-leaderboard-plugin
  • create-leaderboard-data-repo
  • leaderboard-web (Next.js app)
  • Documentation (/docs)
  • Root configuration

Quality Checklist

Core Requirements (Mandatory)

Version Management

  • Changeset added: I have run pnpm changeset for version-tracked packages
    • Changeset follows semantic versioning (patch/minor/major)
    • Changeset description is clear and user-facing
    • OR this PR only affects docs/config and doesn't need a changeset

📚 Learn more: Run pnpm changeset and follow the prompts. See Changesets documentation

Testing

  • Tests added/updated: All new code has corresponding tests
    • Unit tests for business logic
    • Integration tests where applicable
    • Edge cases and error scenarios covered
  • All tests passing: pnpm test runs successfully
  • Test coverage maintained or improved: Run pnpm test:coverage to verify

📚 Learn more: See Testing Guide

Build & Type Safety

  • Build succeeds: pnpm build:packages completes without errors
  • TypeScript types correct: No type errors (pnpm --filter <package> typecheck)
  • Linting passes: pnpm --filter leaderboard-web lint (for web app changes)

Documentation

  • README updated if there are user-facing changes
  • Code comments added for complex logic
  • JSDoc/TSDoc added for public APIs and exported functions
  • Documentation site (/docs) updated if needed
  • Migration guide included if this introduces breaking changes

📚 Learn more: See Architecture docs for project structure

Plugin-Specific Requirements

  • Plugin follows the API contract defined in packages/api/src/types.ts
  • Plugin includes comprehensive tests
  • Plugin has README with clear usage examples
  • Plugin configuration schema is documented
  • Plugin is added to the plugin documentation

📚 Learn more: See Creating Plugins Guide


Screenshots / Videos

Before

Issue showed horizontal overflow and poor layout on mobile devices in the LeaderboardView contributors table (screenshot referenced in issue).

After

Contributors table now properly wraps content on mobile with responsive sizing, preventing horizontal overflow and improving readability on small screens.


- Reduced heading sizes on mobile (text-2xl to text-4xl responsive scale)
- Added responsive padding to all containers (px-4 sm:px-6 lg:px-8)
- Centered view switcher on mobile, right-aligned on larger screens
- Reduced gallery grid columns on mobile (4 instead of 8) for better visibility
- Added responsive text sizes throughout (text-xs to text-sm scales)
- Reduced avatar sizes on mobile (size-14 instead of size-16)
- Added responsive spacing (gap-3 sm:gap-4, mb-8 sm:mb-12)
- Improved gallery view with proper padding and max-width constraint

Agent-Logs-Url: https://github.com/ohcnetwork/leaderboard/sessions/6bf54a99-6410-44e3-a9b4-0eec60c803c1
@Claude Claude AI changed the title [WIP] Fix leaderboard view all contributors for mobile responsiveness Fix mobile responsiveness for contributors page Apr 7, 2026
@Claude Claude AI requested a review from rithviknishad April 7, 2026 09:15
Copy link
Copy Markdown
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mean PeopleView.

I meant responsiveness issue in LeaderboardView component in contributors table

- Changed items-center to items-start to allow proper wrapping
- Reduced padding on mobile: gap-2 sm:gap-3, px-3 sm:px-4
- Reduced rank column width: w-7 sm:w-8 with responsive icon sizing
- Made avatar responsive: size-8 sm:size-9
- Added responsive text sizes: text-xs sm:text-sm for name and points
- Fixed name truncation with proper min-w-0 constraint
- Added flex-wrap to activity breakdown to prevent horizontal overflow
- Made activity badges shrink-0 to maintain consistent sizing
- Wrapped RankChangeBadge in shrink-0 div to prevent compression

Agent-Logs-Url: https://github.com/ohcnetwork/leaderboard/sessions/1afd3f88-7f1a-4830-90fe-56efe0acd1e7

Co-authored-by: rithviknishad <25143503+rithviknishad@users.noreply.github.com>
@Claude
Copy link
Copy Markdown
Contributor Author

Claude AI commented Apr 7, 2026

I didn't mean PeopleView.

I meant responsiveness issue in LeaderboardView component in contributors table

Fixed in e69a0a0. Applied mobile responsiveness fixes to the LeaderboardView contributors table:

  • Reduced spacing and sizing on mobile (text-xs, size-8 avatar, smaller gaps)
  • Added flex-wrap to activity breakdown badges to prevent horizontal overflow
  • Fixed text truncation with proper min-w-0 constraints
  • Made all elements responsive with sm: breakpoints

The mobile row now properly wraps content and prevents overflow on small screens.

@Claude Claude AI changed the title Fix mobile responsiveness for contributors page Fix mobile responsiveness in LeaderboardView contributors table Apr 7, 2026
@Claude Claude AI requested a review from rithviknishad April 7, 2026 10:09
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.

leaderboard view all contributors not responsive in mobile

2 participants