Skip to content

fix: handle mobile question interactions - #11

Merged
varma1221 merged 2 commits into
mainfrom
fix/mobile-question-table-layout
Aug 26, 2026
Merged

varma1221 merged 2 commits into
mainfrom
fix/mobile-question-table-layout

Conversation

@varma1221

Copy link
Copy Markdown
Collaborator

Summary

Fixes the mobile-only failure where tapping a question row or Surprise Me did not open the problem details panel, preventing access to the Open on LeetCode link.

Changes

  • Added explicit touchend activation for question rows.
  • Added explicit touchend activation for the Surprise Me button.
  • Preserved click handlers for mouse users and keyboard handlers for accessibility.
  • Prevented the Space key from scrolling the page when activating a question row.
  • Kept the problem panel rendered at document.body so mobile overflow and stacking contexts cannot hide it.
  • Preserved the existing LeetCode external link behavior.
  • Preserved the earlier mobile table fixes: visible Frequency column and correctly aligned table headers.

Related issue

Closes #10

@varma1221 varma1221 self-assigned this Aug 26, 2026
@varma1221 varma1221 added the bug Something isn't working label Aug 26, 2026
@vercel

vercel Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
by-company Ready Ready Preview Aug 26, 2026 12:22pm

@varma1221

Copy link
Copy Markdown
Collaborator Author

All reported issues have been fixed, and the mobile version is now working properly. The question table headers and Frequency column display correctly, the Surprise Me button and LeetCode links work, the question sidebar opens on tap, and normal scrolling no longer opens the sidebar. Taking the final review from @copilot.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a mobile-only interaction failure where tapping a question row (or the Surprise me control) did not open the problem details panel, blocking access to the Open on LeetCode link. It does so by explicitly handling touch activation, while keeping existing click and keyboard behaviors intact and ensuring the panel cannot be clipped by mobile overflow/stacking contexts.

Changes:

  • Added touchend-based activation for question rows with basic scroll-vs-tap detection, while preserving click and keyboard activation (and preventing Space from scrolling on activation).
  • Added touchend activation for the Surprise me button to improve reliability on mobile browsers.
  • Rendered the ProblemPanel via a portal to document.body to avoid clipping/hiding due to container overflow and stacking contexts; adjusted mobile table header behavior to keep metadata visible and headers pinned appropriately.

Reviewed changes

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

File Description
site/app/globals.css Adds touch-specific CSS (touch-action: manipulation) and updates mobile table header behavior to keep all columns available and headers pinned correctly within the scroll wrapper.
site/app/company/[slug]/SortableQuestionTable.tsx Adds explicit touch handlers for row/button activation and portals the ProblemPanel to document.body to prevent mobile clipping issues.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@varma1221
varma1221 merged commit 8435eef into main Aug 26, 2026
4 checks passed
@varma1221
varma1221 deleted the fix/mobile-question-table-layout branch August 26, 2026 12:33

This branch was successfully deployed

1 active deployment
Preview — a335d0b8 Deployed Aug 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: correct mobile question-table headers and restore the frequency column

2 participants