Hide document composer on scroll down on mobile - #327
Merged
Conversation
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
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
BigSimmo
enabled auto-merge
July 6, 2026 13:16
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
useHideOnScrollhook 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.translateYwhendata-scroll-hidden="true", accounting for the bottom gap and safe area inset.Verification
npm run verify:ui— UI behavior and reduced-motion handling changednpm run format:checkNotes
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