Skip to content

fix: add mobile responsive sidebar drawer and touch-friendly globe co… - #66

Merged
sajeetharan merged 2 commits into
sajeetharan:mainfrom
HereIsMuhammad:feature/mobile-responsive-layout
Aug 6, 2026
Merged

fix: add mobile responsive sidebar drawer and touch-friendly globe co…#66
sajeetharan merged 2 commits into
sajeetharan:mainfrom
HereIsMuhammad:feature/mobile-responsive-layout

Conversation

@HereIsMuhammad

Copy link
Copy Markdown
Contributor

What changed

  • Added a mobile-only hamburger toggle button in the header to open/close the leaderboard sidebar (the CSS drawer transform already existed but had no way to trigger it — this was the main gap)
  • Added a backdrop overlay that closes the sidebar on tap-outside, plus a drag-handle and close button on the sidebar itself (bottom-sheet convention)
  • Sidebar auto-closes when a developer is selected, so the detail panel isn't obstructed on mobile
  • Added touch-action: none on the globe container for more reliable pinch/pan gestures on touch devices
  • Added a 480px breakpoint to tighten the header (icon-only Star/Sponsor buttons) and sidebar height on very small phones
  • Verified the detail panel's existing full-screen-overlay behavior on mobile (768px breakpoint) was already correct, no changes needed there

How I tested it

Syntax-checked all changed files with Babel and a CSS parser (all clean, no duplicate/orphan selectors). Tested manually in browser DevTools responsive mode across breakpoints.

Closes #4

@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

@HereIsMuhammad is attempting to deploy a commit to the sajeetharan's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a mobile-friendly interaction model for the leaderboard sidebar (drawer + backdrop) and improves touch handling for the globe to address the mobile responsiveness gaps described in Issue #4.

Changes:

  • Introduces a mobile-only header hamburger button to toggle the leaderboard drawer, plus a tap-outside backdrop.
  • Updates the leaderboard sidebar to support an “open” state and adds close affordances (drag-handle + close button) for mobile.
  • Improves mobile ergonomics with touch-action: none on the globe container and adds a 480px breakpoint for tighter header/sidebar sizing.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
styles/main.css Adds mobile drawer/backdrop styling, touch-action for globe, and a 480px breakpoint for tighter UI on small screens.
components/Leaderboard.jsx Adds open state styling hook and mobile close affordances for the sidebar.
components/Header.jsx Adds a mobile-only sidebar toggle button and wraps button labels for small-screen hiding.
app/page.jsx Adds sidebarOpen state, wires toggle/close behavior, and renders the backdrop overlay.
Suppressed comments (1)

components/Leaderboard.jsx:130

  • This new close button should specify type="button" to avoid acting as a submit button if the sidebar is ever rendered inside a .
          <button className="sidebar__close-btn" onClick={onClose} aria-label="Close leaderboard" title="Close leaderboard">

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread styles/main.css
return (
<aside className="sidebar" id="sidebar">
<aside className={`sidebar${open ? ' open' : ''}`} id="sidebar">
<div className="sidebar__drag-handle" onClick={onClose} aria-hidden="true" />
Comment thread components/Header.jsx
Comment on lines +18 to +21
onClick={onToggleSidebar}
aria-label={sidebarOpen ? 'Close leaderboard' : 'Open leaderboard'}
aria-expanded={sidebarOpen}
title={sidebarOpen ? 'Close leaderboard' : 'Open leaderboard'}
Comment thread app/page.jsx
onClose={() => setSidebarOpen(false)}
/>
{sidebarOpen && (
<div className="sidebar-backdrop" onClick={() => setSidebarOpen(false)} />
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sajeetharan
sajeetharan merged commit 5d21064 into sajeetharan:main Aug 6, 2026
2 of 3 checks passed
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.

Mobile responsive layout

3 participants