Skip to content

feat(leaderboard): optimize mobile layout, navigation, and sidebar appearance - #422

Merged
trtajim merged 1 commit into
mainfrom
improve-leaderboard-mobile-and-navigation
Oct 14, 2026
Merged

trtajim merged 1 commit into
mainfrom
improve-leaderboard-mobile-and-navigation

Conversation

@trtajim

@trtajim trtajim commented Oct 14, 2026

Copy link
Copy Markdown
Member

Summary

This PR addresses layout issues on mobile viewports for the Leaderboard and navigation components, optimizes sidebar appearance on PC, and refines date calculations for Bangladesh.

Key Changes

  1. Leaderboard Mobile Optimizations (Leaderboard/Index.vue):

    • Compact 'Me' Card: Converted the stacked vertical block on phone into a slim horizontal row () with inline rank/score and a compact action button.
    • Podium & Badges: Shortened rank badges to 'Test fails #1', '404 error while editing folder. #2', 'Bump shivammathur/setup-php from 2.37.1 to 2.37.2 in the github-actions group #3' on phone viewports (), decreased card padding to on mobile, and changed names from single-line truncate to line-clamp-2 break-words to prevent medium and long names from being truncated.
    • Interactive Podium & User Highlighting: Clicking top-3 podium cards or the current user's rank bar smoothly scrolls to and gently highlights their row in the list using a subtle amber pulse/fade animation instead of navigating away.
    • Information Modal: Added an (i) button next to the title that opens a BaseModal explaining the ranking algorithms, timeframes, tie-breaking rules, and privacy settings.
    • Removed 'সহপাঠী খুঁজুন' CTA button when viewing top contributors.
  2. Controller Defaults & Calendar Calculation (LeaderboardController.php):

    • Changed default timeframe from this_week to this_month.
    • Updated this_week to start on Saturday (Carbon::now()->startOfWeek(Carbon::SATURDAY)), aligning with the Bangladeshi work/school calendar.
  3. Navigation Updates (navigation.ts):

    • Promoted Leaderboard to primaryNavItems placed immediately before AI.
  4. Peers Page Header Fix (Peers/Index.vue):

    • Added shrink-0 protection to the Leaderboard trophy button and icon to prevent squishing on mobile.
    • Cleaned up subtitle text to 'সহপাঠী ও অন্য শিক্ষার্থীদের সাথে যুক্ত হোন'.
  5. Desktop Sidebar Appearance Space Saving (Navigation.tsx):

    • Removed the dedicated ~75px Appearance row budget (label and 3-button grid).
    • Moved the theme toggle inline with the Notifications row for logged-in users, and inline with the Login button for guests.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: hscstack/platform/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ae1846fb-5da3-4576-bd4d-090b69f411db
📥 Commits

Reviewing files that changed from the base of the PR and between cbbe281 and f5af05d.

📒 Files selected for processing: 5
  • app/Http/Controllers/LeaderboardController.php
  • resources/js/components/navigation/Navigation.tsx
  • resources/js/lib/navigation.ts
  • resources/js/pages/Leaderboard/Index.vue
  • resources/js/pages/Peers/Index.vue
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@trtajim
trtajim merged commit faca3a2 into main Oct 14, 2026
5 of 6 checks passed
@trtajim
trtajim deleted the improve-leaderboard-mobile-and-navigation branch October 14, 2026 09:23
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