Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -269,6 +269,7 @@ function filterAndSortItems(
const effectiveSort: SortMode = viewMode === "recent" ? "last-used" : sortMode;

return items
.filter((item) => viewMode !== "recent" || lastUsedScore(item.lastUsed) > 1000)
.filter((item) => selectedTypeIds.size === 0 || selectedTypeIds.has(item.tabId))
.filter((item) => selectedSetTitles.size === 0 || selectedSetTitles.has(item.set))
.filter((item) => !pinnedOnly || item.pinned === true)
Expand Down
2 changes: 1 addition & 1 deletion src/components/clinical-dashboard/global-search-shell.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -160,7 +160,7 @@ export function GlobalSearchShell(props: GlobalSearchShellProps) {
// fallback and resolved content briefly coexisted. A route-agnostic mode-home
// skeleton (the same one `loading.tsx` shows during navigation) reserves the
// layout so the first frame reads as "loading" instead of a blank background.
<div className="min-h-dvh bg-[color:var(--background)] text-[color:var(--text)]">
<div className="min-h-0 bg-[color:var(--background)] text-[color:var(--text)] sm:min-h-dvh">
<ModeHomeRouteLoading />
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/mode-home-page-skeleton.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,7 +29,7 @@ export function ModeHomeRouteLoading() {
return (
// Match ModeHomeMain startOnPhone: top-align on phones, centre from sm up.
// A phone-centred skeleton jumped when content-rich homes mounted top-aligned.
<div className="grid min-h-[calc(100dvh-var(--shell-header-h))] items-start justify-items-center bg-[color:var(--background)] pt-3 sm:items-center sm:pt-0">
<div className="grid min-h-0 items-start justify-items-center bg-[color:var(--background)] pt-3 sm:min-h-[calc(100dvh-var(--shell-header-h))] sm:items-center sm:pt-0">
<ModeHomePageSkeleton />
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/phone-scroll.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -200,7 +200,7 @@ export function forceCompiledStandalonePhoneCss(page: Page): Promise<number> {
}
const style = document.createElement("style");
style.dataset.testid = "forced-standalone-phone-css";
style.textContent = `@layer components { ${standaloneRules.join("\n")} }`;
style.textContent = standaloneRules.join("\n");
document.head.append(style);
window.dispatchEvent(new Event("resize"));
return standaloneRules.length;
Expand Down
10 changes: 10 additions & 0 deletions tests/ui-phone-scroll-routes.spec.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -170,3 +170,13 @@ test("phone forms search hides header and footer after submit without stale focu
);
expect(Number.parseFloat(afterHide.reservePb) || 0, "hidden reserve releases the bottom rail").toBeLessThanOrEqual(1);
});

test("phone route flips under reducedMotion: 'reduce' preserve layout and scroll owner", async ({ page }) => {
await page.emulateMedia({ reducedMotion: "reduce" });
await page.setViewportSize(phoneViewport);
await gotoPhoneSurface(page, "/calculators");
await addPhoneScrollRunway(page);
const initial = await readGeometry(page);
expect(initial.scrollOwner, "browser route uses document scrolling").toBe("document");
expect(initial.headerHidden, "header visible at top").toBe(false);
});
Loading