fix(mobile): fully hide dashboard header on phone scroll down#415
Merged
Conversation
On phones the dashboard uses a collapse hide-on-scroll strategy where the header sits above an internally scrolling <main>. Sticky positioning fought the 0fr grid collapse, leaving ~19px of header chrome visible. Switch the header to relative positioning on max-sm for collapse hosts. Also wire scroll reporting through ClinicalDashboard main onScroll so hide state updates reliably from the real scroll container, keep the passive listener as a backup, and harden useHideOnScroll state tracking. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
BigSimmo
marked this pull request as ready for review
July 8, 2026 18:22
BigSimmo
enabled auto-merge (squash)
July 9, 2026 03:40
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
This was referenced Jul 9, 2026
3 tasks
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 free
to 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
Fixes phone hide-on-scroll for the universal header in the dashboard (Answer mode and other routes using
ClinicalDashboard).Two issues prevented the header from fully disappearing when scrolling down on phones:
0fr, but the header stayedsticky top-0, which pinned ~19px of chrome in the viewport. Collapse hosts now usemax-sm:relative(overlay/document-scroll hosts keep sticky).ClinicalDashboard's<main onScroll>viauseScrollHideReporter, with the passive element/window listener kept as a backup.Verification
npm run verify:cheapnpm run verify:ui— mobile header translate/collapse; recommend a quick phone scroll check on Answer resultsnpm run verify:releasenot run (scoped mobile chrome fix)Clinical Governance Preflight
Not applicable — UI chrome only; no ingestion, answer generation, search, privacy, or clinical output changes.
Notes
/forms,/services, etc.) use the overlay strategy and were already hiding correctly via document scroll + translate.<main>collapses header to 0 visible pixels.