Skip to content

Commit fd5869f

Browse files
UI/mobile keyboard and pwa popup fixes (#24610)
* ui: make mobile layout keyboard-aware via interactive-widget and dvh shell anchor * ui: fix duplicate PWA refresh popup by scoping the storage check to non-PWA pages
1 parent 1fd6dfe commit fd5869f

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

tools/ui/src/app.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99

1010
<link rel="manifest" href="./manifest.webmanifest" />
1111

12-
<meta name="viewport" content="width=device-width, initial-scale=1" />
12+
<meta
13+
name="viewport"
14+
content="width=device-width, initial-scale=1, interactive-widget=resizes-content"
15+
/>
1316
%sveltekit.head%
1417
</head>
1518

tools/ui/src/lib/components/ui/sidebar/sidebar-provider.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
data-slot="sidebar-wrapper"
4242
style="--sidebar-width: {sidebar.sidebarWidth}; --sidebar-min-width: {SIDEBAR_MIN_WIDTH}; --sidebar-max-width: {SIDEBAR_MAX_WIDTH}; --sidebar-width-icon: {SIDEBAR_WIDTH_ICON}; {style}"
4343
class={cn(
44-
'group/sidebar-wrapper flex flex-col min-h-svh w-full has-data-[variant=inset]:bg-sidebar',
44+
'group/sidebar-wrapper flex flex-col h-dvh w-full has-data-[variant=inset]:bg-sidebar',
4545
className
4646
)}
4747
bind:this={ref}

tools/ui/src/lib/hooks/use-pwa.svelte.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ export function usePwa() {
5353
// This comparison detects server upgrades for non-PWA users.
5454
$effect(() => {
5555
if (!browser) return;
56+
// PWA pages update via the service worker path; the storage check is the non-PWA fallback only
57+
if (navigator.serviceWorker?.controller) return;
5658

5759
const currentVersion = versionStore.value;
5860
if (!currentVersion) return;

0 commit comments

Comments
 (0)