diff --git a/src/app/globals.css b/src/app/globals.css index b08aed0ee..053aef87c 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -676,12 +676,13 @@ summary::-webkit-details-marker { transparent 0%, color-mix(in srgb, var(--background) 8%, transparent) 38%, color-mix(in srgb, var(--background) 18%, transparent) 68%, - color-mix(in srgb, var(--background) 32%, transparent) 100% + color-mix(in srgb, var(--background) 32%, transparent) 88%, + color-mix(in srgb, var(--background) 42%, transparent) 100% ); backdrop-filter: blur(2px) saturate(130%); -webkit-backdrop-filter: blur(2px) saturate(130%); - mask-image: linear-gradient(180deg, rgb(0 0 0 / 20%) 0%, rgb(0 0 0 / 45%) 28%, black 60%, black 100%); - -webkit-mask-image: linear-gradient(180deg, rgb(0 0 0 / 20%) 0%, rgb(0 0 0 / 45%) 28%, black 60%, black 100%); + mask-image: linear-gradient(180deg, rgb(0 0 0 / 20%) 0%, rgb(0 0 0 / 45%) 28%, black 55%, black 100%); + -webkit-mask-image: linear-gradient(180deg, rgb(0 0 0 / 20%) 0%, rgb(0 0 0 / 45%) 28%, black 55%, black 100%); } .answer-footer-search-dock .answer-footer-search-backdrop::before, @@ -702,8 +703,8 @@ summary::-webkit-details-marker { .answer-footer-search-dock .answer-footer-search-backdrop::after { backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); - mask-image: linear-gradient(180deg, transparent 0%, transparent 55%, black 72%, black 100%); - -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 55%, black 72%, black 100%); + mask-image: linear-gradient(180deg, transparent 0%, transparent 50%, black 68%, black 100%); + -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 50%, black 68%, black 100%); } @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { @@ -1307,17 +1308,22 @@ summary::-webkit-details-marker { } @media (max-width: 639px) { - .dashboard-composer-edge.answer-footer-search-edge { + .edge-glass-header { + padding-left: max(0px, var(--safe-area-left)); + padding-right: max(0px, var(--safe-area-right)); + } + + .dashboard-composer-edge.answer-footer-search-edge:not(.answer-footer-search-dock) { width: min(calc(100vw - 8px - var(--safe-area-left) - var(--safe-area-right)), 400px); } - .document-mobile-search-edge { + .document-mobile-search-edge:not(.answer-footer-search-dock) { left: max(0.375rem, var(--safe-area-left)); right: max(0.375rem, var(--safe-area-right)); bottom: max(0.5rem, calc(var(--safe-area-bottom) + 0.375rem)); } - .document-mobile-search-edge.answer-footer-search-edge { + .document-mobile-search-edge.answer-footer-search-edge:not(.answer-footer-search-dock) { left: 50%; right: auto; bottom: max(0.45rem, calc(var(--safe-area-bottom) + 0.35rem)); @@ -1327,7 +1333,7 @@ summary::-webkit-details-marker { /* Compact search/result views: no chip row below the pill, so the pill itself hugs the bottom edge and the scrim shrinks to match. */ - .document-mobile-search-edge.answer-footer-search-edge.document-mobile-search-compact { + .document-mobile-search-edge.answer-footer-search-edge.document-mobile-search-compact:not(.answer-footer-search-dock) { bottom: max(0.4rem, calc(var(--safe-area-bottom) + 0.3rem)); } diff --git a/src/components/ClinicalDashboard.tsx b/src/components/ClinicalDashboard.tsx index bb9622bf6..23d2dd77a 100644 --- a/src/components/ClinicalDashboard.tsx +++ b/src/components/ClinicalDashboard.tsx @@ -4258,6 +4258,13 @@ export function ClinicalDashboard({ const compactMobileBottomSearch = hasMobileBottomSearch && modeSearchSubmitted; const differentialsCompareAddonActive = searchMode === "differentials" && modeSearchSubmitted && Boolean(query.trim()); + const mobileComposerReserve = !hasMobileBottomSearch + ? "0px" + : compactMobileBottomSearch + ? differentialsCompareAddonActive + ? "calc(8.75rem + env(safe-area-inset-bottom))" + : "calc(5rem + env(safe-area-inset-bottom))" + : "calc(5.25rem + env(safe-area-inset-bottom))"; const renderDegradedNotice = () => ( @@ -4482,6 +4490,7 @@ export function ClinicalDashboard({
) to avoid a needless scrollbar. @@ -4523,7 +4532,9 @@ export function ClinicalDashboard({
- +
+ { setQueryOverride({ source: query, value: "" }); @@ -28,6 +29,7 @@ export function FavouritesHomePage({ query = "" }: FavouritesHomePageProps) { desktopComposerSlotId={modeHomeDesktopComposerSlotId} headingLevel={1} /> +
); } diff --git a/src/components/clinical-dashboard/global-mockup-search-shell.tsx b/src/components/clinical-dashboard/global-mockup-search-shell.tsx index 9cf2a52f1..235130a6c 100644 --- a/src/components/clinical-dashboard/global-mockup-search-shell.tsx +++ b/src/components/clinical-dashboard/global-mockup-search-shell.tsx @@ -158,6 +158,13 @@ function GlobalMockupSearchShellClient({ const effectiveSidebarCollapsed = isDifferentialPresentationWorkflow ? true : sidebarCollapsed; const effectiveSidebarWidth = shouldShowDesktopSidebar ? (effectiveSidebarCollapsed ? "5.25rem" : "20rem") : "0px"; const shouldShowSearchComposer = searchComposerVisible && !isDifferentialPresentationWorkflow; + const mobileComposerReserve = !shouldShowSearchComposer + ? "2rem" + : searchMode === "answer" + ? "calc(9rem + env(safe-area-inset-bottom))" + : useCompactBottomSearch + ? "calc(5.5rem + env(safe-area-inset-bottom))" + : "calc(9rem + env(safe-area-inset-bottom))"; useEffect(() => { // Re-derive the mode and query from the URL, but only when the search string @@ -312,7 +319,7 @@ function GlobalMockupSearchShellClient({ return (
@@ -348,7 +356,7 @@ function GlobalMockupSearchShellClient({
) : null} -
+
{/* max-sm:contents lets the header's own `sticky top-0` engage against the document scroll on phones (a plain wrapper div otherwise caps its sticking range at its own height), which the phone @@ -415,17 +423,16 @@ function GlobalMockupSearchShellClient({ id="main-content" tabIndex={-1} className={cn( - // Phone: fill the space under the header exactly (the header is - // taller than the 4rem the calc assumed, which forced a phantom - // scrollbar on every standalone page). sm+ keeps the original calc. - "min-w-0 overflow-x-hidden focus:outline-none max-sm:flex-1 sm:min-h-[calc(100dvh-4rem)]", + // Phone: flex column fills the viewport under the header; composer + // clearance comes from --mobile-composer-reserve on the shell. + "min-w-0 overflow-x-hidden focus:outline-none max-sm:flex max-sm:min-h-0 max-sm:flex-1 max-sm:flex-col max-sm:pb-[var(--mobile-composer-reserve)] sm:min-h-[calc(100dvh-4rem)]", !shouldShowSearchComposer - ? "pb-8" + ? "sm:pb-8" : searchMode === "answer" - ? "pb-[calc(9rem+env(safe-area-inset-bottom))]" + ? "sm:pb-[calc(9rem+env(safe-area-inset-bottom))]" : useCompactBottomSearch - ? "pb-[calc(5.5rem+env(safe-area-inset-bottom))] sm:pb-8" - : "pb-[calc(9rem+env(safe-area-inset-bottom))] sm:pb-8", + ? "sm:pb-[calc(5.5rem+env(safe-area-inset-bottom))] sm:pb-8" + : "sm:pb-[calc(9rem+env(safe-area-inset-bottom))] sm:pb-8", )} > @@ -228,20 +224,23 @@ export function ModeHomeTemplate({
{desktopComposerSlotId ? ( -
+
) : null} {actions.length ? (
{actions.map((action, index) => { const ActionIcon = action.icon; @@ -294,7 +293,7 @@ export function ModeHomeTemplate({ ) : null} {pills?.length ? ( -
+
{pillsTitle || pillsAction ? (
) : null} - {footer ?
{footer}
: null} + {footer ?
{footer}
: null}
); }