Skip to content

feat: add mobile compatibility#260

Merged
backnotprop merged 4 commits into
backnotprop:mainfrom
grubmanItay:feat/mobile-compatibility
Mar 11, 2026
Merged

feat: add mobile compatibility#260
backnotprop merged 4 commits into
backnotprop:mainfrom
grubmanItay:feat/mobile-compatibility

Conversation

@grubmanItay
Copy link
Copy Markdown
Contributor

Summary

  • Hamburger menu replaces header buttons on mobile (<768px)
  • Annotation panel renders as a full-screen overlay with backdrop and close button
  • Touch support for resize handles, pinpoint annotations, text selection, and toolstrip
  • Card action buttons are always visible on touch devices (no hover needed)
  • Settings modal uses horizontal tab bar on mobile
  • CommentPopover width capped to viewport
  • Desktop layout (>=768px) completely unchanged

Files Changed

  • New: useIsMobile hook, MobileMenu component
  • Modified: App.tsx, AnnotationPanel, AnnotationToolstrip, CommentPopover, EditorAnnotationCard, ModeToggle, ResizeHandle, Settings, Viewer, usePinpoint, useResizablePanel

Test plan

  • Desktop (>768px): verify no visual changes, all functionality works
  • Mobile (<768px): Chrome DevTools device toolbar
    • Panel starts closed
    • Hamburger menu shows all options
    • Panel opens as overlay with backdrop
    • Toolstrip labels visible without hover
    • Card edit/delete buttons visible without hover
    • Text selection creates annotations
    • Pinpoint tap-to-annotate works
    • Settings modal renders with horizontal tabs
    • CommentPopover fits screen width

🤖 Generated with Claude Code

- Add responsive hamburger menu with all header actions (MobileMenu)
- Annotation panel renders as full-screen overlay on mobile with backdrop and close button
- Panel starts closed on mobile (<768px)
- Touch support for resize handles, pinpoint annotations, and toolstrip buttons
- Mobile text selection creates annotations via highlighter.fromRange() bridge
- Card action buttons always visible on touch devices (hover:none media query)
- Settings modal uses horizontal tab bar on mobile
- CommentPopover width capped to viewport on small screens
- Replace mousedown with pointerdown for touch-compatible click-outside handling
- Add useIsMobile reactive hook for breakpoint detection
- Desktop layout (>=768px) unchanged

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@backnotprop
Copy link
Copy Markdown
Owner

Ah this was on the todo list, great stuff

@backnotprop
Copy link
Copy Markdown
Owner

Code review

Found 1 issue:

  1. Mobile backdrop (z-[59]) covers the sticky header (z-[50]), blocking header controls while the annotation panel is open. The backdrop uses fixed inset-0 which spans the full viewport including the header area. Since z-[59] > z-[50], the backdrop renders on top of the header, preventing access to the logo, hamburger menu, and other header buttons. Users can only dismiss the panel via the backdrop click or X button — they cannot interact with any header controls. Either the backdrop z-index should be lower than the header, or the header z-index should be raised above the backdrop.

{/* Minimal Header */}
<header className="h-12 flex items-center justify-between px-2 md:px-4 border-b border-border/50 bg-card/50 backdrop-blur-xl sticky top-0 z-[50]">
<div className="flex items-center gap-2 md:gap-3">

<div
className="fixed inset-0 z-[59] bg-background/60 backdrop-blur-sm"
onClick={onClose}

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@backnotprop
Copy link
Copy Markdown
Owner

I'll review these before you need to address anything.

@backnotprop
Copy link
Copy Markdown
Owner

Reviewing PR's now. Have a fun new tool to support...

image

backnotprop and others added 3 commits March 11, 2026 15:56
- AnnotationPanel: fix bottom gap on mobile overlay (inset-y-12 → top-12 bottom-0)
- Viewer: push in-plan action buttons below badges on mobile (mt-6), add
  clear-right before frontmatter, show short labels (Comment/Copy) on mobile
- App: reduce mobile horizontal padding to 8px (px-2)
- test-hook.sh: build review before hook to fix missing dist error

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a configurable plan width preference (compact 832px, default 1040px,
wide 1280px) with an abstract layout preview in Settings. Dynamic max-width
flows through to Viewer, PlanDiffViewer, and the toolstrip. Default is
compact to preserve existing behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@backnotprop backnotprop merged commit 5437a37 into backnotprop:main Mar 11, 2026
3 checks passed
backnotprop added a commit to dgrissen2/plannotator_ext that referenced this pull request Mar 12, 2026
The handleOpenLinkedDoc callback references imageBaseDir as a
fallback for first-hop relative path resolution, but the state
variable and its wiring from the /api/plan response were missing
on this branch (they exist on main via backnotprop#260). Add them here so
the branch works standalone and merges cleanly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@grubmanItay
Copy link
Copy Markdown
Contributor Author

There is a UI bug: while selecting text, the default context menu (cut/copy/paste) pops up and overlaps the icon row.

I will handle this later.

@grubmanItay grubmanItay deleted the feat/mobile-compatibility branch March 12, 2026 09:03
backnotprop added a commit that referenced this pull request Mar 16, 2026
Move TaterSpriteRunning inside the z-0 content wrapper stacking context
so it layers correctly: above sidebars (z-auto) but below the plan
document (z-10). The mobile compat PR (#260) added relative z-0 to the
content wrapper, which trapped the plan at z-0 while the sprite at z-40
floated above everything.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
backnotprop added a commit that referenced this pull request Mar 16, 2026
* fix: tater sprite running behind plan document instead of in front

Move TaterSpriteRunning inside the z-0 content wrapper stacking context
so it layers correctly: above sidebars (z-auto) but below the plan
document (z-10). The mobile compat PR (#260) added relative z-0 to the
content wrapper, which trapped the plan at z-0 while the sprite at z-40
floated above everything.


* fix: move z-10 from main to inner content so sprite runs above grid
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.

2 participants