Skip to content

Hide document composer on scroll down on mobile - #327

Merged
BigSimmo merged 1 commit into
mainfrom
claude/mobile-search-bar-scroll-ense41
Jul 6, 2026
Merged

Hide document composer on scroll down on mobile#327
BigSimmo merged 1 commit into
mainfrom
claude/mobile-search-bar-scroll-ense41

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

Adds hide-on-scroll behavior to the bottom composer in the document viewer on phones, matching the dock's existing behavior. The composer slides out of view when scrolling down past an activation offset and reappears when scrolling up or when keyboard focus enters the form.

Changes

  • DocumentViewer.tsx: Integrated useHideOnScroll hook to track scroll state and added focus tracking to prevent hiding the composer while keyboard users are interacting with it. The composer now respects three conditions before hiding: scroll state, mobile actions sheet visibility, and internal focus state.
  • globals.css: Added CSS rule to transform the composer off-screen with translateY when data-scroll-hidden="true", accounting for the bottom gap and safe area inset.
  • ui-smoke.spec.ts: Added comprehensive test covering the hide-on-scroll behavior, including scroll down/up transitions and keyboard focus reveal.

Verification

  • Added UI smoke test covering scroll hide/show and keyboard focus interactions
  • npm run verify:ui — UI behavior and reduced-motion handling changed
  • npm run format:check

Notes

The implementation ensures keyboard accessibility by preventing the composer from being hidden while focus is inside it, so users tabbing through form controls won't encounter invisible inputs. The mobile actions sheet also prevents hiding to maintain UX consistency when the sheet is open.

https://claude.ai/code/session_01UULp5Leufjv9WfbEHrRSgF

The document viewer's fixed bottom search composer on /documents/[id]
was the one remaining mobile surface that stayed on screen while
scrolling. Wire it into the existing phone-only useHideOnScroll hook
(window scroll) so it slides off on scroll-down and returns on
scroll-up, mirroring the bottom search dock's data-scroll-hidden
pattern. Guards keep it visible while the mobile actions sheet is open
or focus is inside the composer, so keyboard users never tab into
invisible controls and typing with the iOS keyboard open cannot hide
it. Covered by a phone-viewport Playwright spec in ui-smoke.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UULp5Leufjv9WfbEHrRSgF
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@BigSimmo
BigSimmo enabled auto-merge July 6, 2026 13:16
@supabase

supabase Bot commented Jul 6, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo
BigSimmo merged commit 61809f9 into main Jul 6, 2026
5 checks passed
@BigSimmo
BigSimmo deleted the claude/mobile-search-bar-scroll-ense41 branch July 8, 2026 16:21
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