-
Notifications
You must be signed in to change notification settings - Fork 0
Fix mobile edge-to-edge content when chrome hides #900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -260,7 +260,7 @@ function GlobalStandaloneSearchShellClient({ | |
| const reservesFloatingComposer = shouldShowSearchComposer && !isStandaloneModeHome; | ||
| // Standalone mode homes portal the composer into the hero (in-flow at every | ||
| // width), so phones need no bottom-dock clearance there. | ||
| const mobileComposerReserve = !shouldShowSearchComposer | ||
| const visibleMobileComposerReserve = !shouldShowSearchComposer | ||
| ? "2rem" | ||
| : isStandaloneModeHome | ||
| ? "2rem" | ||
|
|
@@ -271,6 +271,15 @@ function GlobalStandaloneSearchShellClient({ | |
| : useCompactBottomSearch | ||
| ? "calc(5.5rem + env(safe-area-inset-bottom))" | ||
| : "calc(9rem + env(safe-area-inset-bottom))"; | ||
| // When phone chrome hides on downward scroll, release the large bottom | ||
| // composer reserve as well. Otherwise long content reaches the end of the | ||
| // internal scrollport while a toolbar-sized blank band remains between the | ||
| // page and Safari's collapsed address bar. Keep only a small safe-area | ||
| // breathing room so the site content, not the background, fills the revealed | ||
| // edge-to-edge viewport. | ||
| const mobileComposerReserve = phoneScrollHide.hidden | ||
| ? "max(0.75rem, env(safe-area-inset-bottom))" | ||
| : visibleMobileComposerReserve; | ||
|
Comment on lines
+280
to
+282
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
On phone differential search results with the compare add-on active, Useful? React with 👍 / 👎.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @codex fix There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Summary
Testing
|
||
|
|
||
| useEffect(() => { | ||
| // Re-derive the mode and query from the URL, but only when the search string | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Base the reserve on effective composer visibility.
phoneScrollHide.hiddencan remaintruewhileMasterSearchHeaderkeeps the header/composer visible for an open menu or focused control (master-search-header.tsxlines 308-330). This drops the main content reserve to0.75remwhile visible chrome can still overlay the bottom of#main-content. Use the same effective hidden state, or expose that state fromMasterSearchHeader, and add a regression test for reopening/focusing chrome after scroll-hide.🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codex fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
mobileBottomComposerHiddenstate in the global shell and now shrink--mobile-composer-reserveonly when the bottom composer reports that it is effectively hidden, preserving the full reserve while menus, focus, or persistent add-ons keep the dock visible. src/components/clinical-dashboard/global-search-shell.tsxL162-L164 src/components/clinical-dashboard/global-search-shell.tsxL275-L282onMobileBottomComposerHiddenChangecallback fromMasterSearchHeader, reporting the existing effective hidden state that already accounts for phone layout, add-ons, open menus/dropdowns/sheets, and composer focus. src/components/clinical-dashboard/master-search-header.tsxL240-L243 src/components/clinical-dashboard/master-search-header.tsxL327-L341MasterSearchHeader. src/components/clinical-dashboard/global-search-shell.tsxL579-L5882882294 fix(ui): reserve space until mobile dock hides.make_prtool: “Fix mobile reserve until bottom dock actually hides”.Testing
git diff --checknpm run test:focused -- --files src/components/clinical-dashboard/global-search-shell.tsx,src/components/clinical-dashboard/master-search-header.tsx,tests/clinical-dashboard-merge-artifacts.test.ts— focused runner rejected direct test/config paths and instructed running the full unit suite.npm run test— blocked by environment setup: missingnode_modules/vitest/vitest.mjs; local runtime reportedNode.js v20.20.2.View task →
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.