Skip to content

Modern Docker Management, Designed for Everyone

fix: scroll-to-hide by mode, fix detachment (#781)

Chase Baucomc377ea8b7cac
diff --git a/backend/internal/dto/settings_dto.go b/backend/internal/dto/settings_dto.go
index 2b46b5b36..ff647cb62 100644
--- a/backend/internal/dto/settings_dto.go
+++ b/backend/internal/dto/settings_dto.go
@@ -29,11 +29,10 @@ type UpdateSettingsDto struct {
AuthSessionTimeout *string `json:"authSessionTimeout,omitempty"`
AuthPasswordPolicy *string `json:"authPasswordPolicy,omitempty"`
AuthOidcConfig *string `json:"authOidcConfig,omitempty"`
- OnboardingCompleted *string `json:"onboardingCompleted,omitempty"`
- OnboardingSteps *string `json:"onboardingSteps,omitempty"`
- MobileNavigationMode *string `json:"mobileNavigationMode,omitempty"`
- MobileNavigationShowLabels *string `json:"mobileNavigationShowLabels,omitempty"`
- MobileNavigationScrollToHide *string `json:"mobileNavigationScrollToHide,omitempty"`
- SidebarHoverExpansion *string `json:"sidebarHoverExpansion,omitempty"`
- GlassEffectEnabled *string `json:"glassEffectEnabled,omitempty"`
+ OnboardingCompleted *string `json:"onboardingCompleted,omitempty"`
+ OnboardingSteps *string `json:"onboardingSteps,omitempty"`
+ MobileNavigationMode *string `json:"mobileNavigationMode,omitempty"`
+ MobileNavigationShowLabels *string `json:"mobileNavigationShowLabels,omitempty"`
+ SidebarHoverExpansion *string `json:"sidebarHoverExpansion,omitempty"`
+ GlassEffectEnabled *string `json:"glassEffectEnabled,omitempty"`
}
diff --git a/backend/internal/models/settings.go b/backend/internal/models/settings.go
index 551abf235..9beb9cea9 100644
--- a/backend/internal/models/settings.go
+++ b/backend/internal/models/settings.go
@@ -77,11 +77,10 @@ type Settings struct {
AuthOidcConfig SettingVariable `key:"authOidcConfig,sensitive" meta:"label=OIDC Config;type=text;keywords=oidc,config,client,id,issuer,secret,oauth;category=security;description=OIDC provider configuration"`
// Navigation category
- MobileNavigationMode SettingVariable `key:"mobileNavigationMode,public,local" meta:"label=Mobile Navigation Mode;type=select;keywords=mode,style,type,floating,docked,position,layout,design,appearance,bottom;category=navigation;description=Choose between floating or docked navigation on mobile" catmeta:"id=navigation;title=Navigation;icon=navigation;url=/settings/navigation;description=Customize navigation and interface behavior"`
- MobileNavigationShowLabels SettingVariable `key:"mobileNavigationShowLabels,public,local" meta:"label=Show Navigation Labels;type=boolean;keywords=labels,text,icons,display,show,hide,names,captions,titles,visible,toggle;category=navigation;description=Display text labels alongside navigation icons"`
- MobileNavigationScrollToHide SettingVariable `key:"mobileNavigationScrollToHide,public,local" meta:"label=Scroll to Hide;type=boolean;keywords=scroll,hide,auto-hide,behavior,down,up,automatic,disappear,vanish,minimize,collapse;category=navigation;description=Automatically hide navigation when scrolling down"`
- SidebarHoverExpansion SettingVariable `key:"sidebarHoverExpansion,public,local" meta:"label=Sidebar Hover Expansion;type=boolean;keywords=sidebar,hover,expansion,expand,desktop,mouse,over,collapsed,collapsible,icon,labels,text,preview,peek,tooltip,overlay,temporary,quick,access,navigation,menu,items,submenu,nested;category=navigation;description=Expand sidebar on hover in desktop mode"`
- GlassEffectEnabled SettingVariable `key:"glassEffectEnabled,public,local" meta:"label=Glass Effect;type=boolean;keywords=glass,glassmorphism,blur,backdrop,frosted,effect,gradient,ambient,design,ui,appearance,modern,visual,style,theme,transparency,translucent;category=navigation;description=Enable modern glassmorphism design with blur, gradients, and ambient effects"`
+ MobileNavigationMode SettingVariable `key:"mobileNavigationMode,public,local" meta:"label=Mobile Navigation Mode;type=select;keywords=mode,style,type,floating,docked,position,layout,design,appearance,bottom;category=navigation;description=Choose between floating or docked navigation on mobile" catmeta:"id=navigation;title=Navigation;icon=navigation;url=/settings/navigation;description=Customize navigation and interface behavior"`
+ MobileNavigationShowLabels SettingVariable `key:"mobileNavigationShowLabels,public,local" meta:"label=Show Navigation Labels;type=boolean;keywords=labels,text,icons,display,show,hide,names,captions,titles,visible,toggle;category=navigation;description=Display text labels alongside navigation icons"`
+ SidebarHoverExpansion SettingVariable `key:"sidebarHoverExpansion,public,local" meta:"label=Sidebar Hover Expansion;type=boolean;keywords=sidebar,hover,expansion,expand,desktop,mouse,over,collapsed,collapsible,icon,labels,text,preview,peek,tooltip,overlay,temporary,quick,access,navigation,menu,items,submenu,nested;category=navigation;description=Expand sidebar on hover in desktop mode"`
+ GlassEffectEnabled SettingVariable `key:"glassEffectEnabled,public,local" meta:"label=Glass Effect;type=boolean;keywords=glass,glassmorphism,blur,backdrop,frosted,effect,gradient,ambient,design,ui,appearance,modern,visual,style,theme,transparency,translucent;category=navigation;description=Enable modern glassmorphism design with blur, gradients, and ambient effects"`
InstanceID SettingVariable `key:"instanceId,internal" meta:"label=Instance ID;type=text;keywords=instance,id,uuid,identifier;category=internal;description=Unique instance identifier"`
}
diff --git a/backend/internal/services/settings_service.go b/backend/internal/services/settings_service.go
index 8c83b45c0..c54be3c9a 100644
--- a/backend/internal/services/settings_service.go
+++ b/backend/internal/services/settings_service.go
@@ -92,14 +92,13 @@ func (s *SettingsService) getDefaultSettings() *models.Settings {
AuthSessionTimeout: models.SettingVariable{Value: "1440"},
AuthPasswordPolicy: models.SettingVariable{Value: "strong"},
AuthOidcConfig: models.SettingVariable{Value: "{}"},
- OnboardingCompleted: models.SettingVariable{Value: "false"},
- OnboardingSteps: models.SettingVariable{Value: "[]"},
- MobileNavigationMode: models.SettingVariable{Value: "floating"},
- MobileNavigationShowLabels: models.SettingVariable{Value: "true"},
- MobileNavigationScrollToHide: models.SettingVariable{Value: "true"},
- SidebarHoverExpansion: models.SettingVariable{Value: "true"},
- GlassEffectEnabled: models.SettingVariable{Value: "false"},
- AccentColor: models.SettingVariable{Value: "oklch(0.606 0.25 292.717)"},
+ OnboardingCompleted: models.SettingVariable{Value: "false"},
+ OnboardingSteps: models.SettingVariable{Value: "[]"},
+ MobileNavigationMode: models.SettingVariable{Value: "floating"},
+ MobileNavigationShowLabels: models.SettingVariable{Value: "true"},
+ SidebarHoverExpansion: models.SettingVariable{Value: "true"},
+ GlassEffectEnabled: models.SettingVariable{Value: "false"},
+ AccentColor: models.SettingVariable{Value: "oklch(0.606 0.25 292.717)"},
InstanceID: models.SettingVariable{Value: ""},
}
diff --git a/backend/resources/migrations/postgres/020_remove_mobile_navigation_scroll_to_hide_setting.down.sql b/backend/resources/migrations/postgres/020_remove_mobile_navigation_scroll_to_hide_setting.down.sql
new file mode 100644
index 000000000..5ac9b7c71
--- /dev/null
+++ b/backend/resources/migrations/postgres/020_remove_mobile_navigation_scroll_to_hide_setting.down.sql
@@ -0,0 +1,2 @@
+INSERT INTO settings (key, value) VALUES ('mobileNavigationScrollToHide', 'true');
+
diff --git a/backend/resources/migrations/postgres/020_remove_mobile_navigation_scroll_to_hide_setting.up.sql b/backend/resources/migrations/postgres/020_remove_mobile_navigation_scroll_to_hide_setting.up.sql
new file mode 100644
index 000000000..3f490bb39
--- /dev/null
+++ b/backend/resources/migrations/postgres/020_remove_mobile_navigation_scroll_to_hide_setting.up.sql
@@ -0,0 +1,2 @@
+DELETE FROM settings WHERE key = 'mobileNavigationScrollToHide';
+
diff --git a/backend/resources/migrations/sqlite/020_remove_mobile_navigation_scroll_to_hide_setting.down.sql b/backend/resources/migrations/sqlite/020_remove_mobile_navigation_scroll_to_hide_setting.down.sql
new file mode 100644
index 000000000..5ac9b7c71
--- /dev/null
+++ b/backend/resources/migrations/sqlite/020_remove_mobile_navigation_scroll_to_hide_setting.down.sql
@@ -0,0 +1,2 @@
+INSERT INTO settings (key, value) VALUES ('mobileNavigationScrollToHide', 'true');
+
diff --git a/backend/resources/migrations/sqlite/020_remove_mobile_navigation_scroll_to_hide_setting.up.sql b/backend/resources/migrations/sqlite/020_remove_mobile_navigation_scroll_to_hide_setting.up.sql
new file mode 100644
index 000000000..3f490bb39
--- /dev/null
+++ b/backend/resources/migrations/sqlite/020_remove_mobile_navigation_scroll_to_hide_setting.up.sql
@@ -0,0 +1,2 @@
+DELETE FROM settings WHERE key = 'mobileNavigationScrollToHide';
+
diff --git a/frontend/messages/en.json b/frontend/messages/en.json
index 2bd077e37..cb64a1e03 100644
--- a/frontend/messages/en.json
+++ b/frontend/messages/en.json
@@ -905,8 +905,6 @@
"navigation_mode_docked": "Docked",
"navigation_show_labels_label": "Show Labels",
"navigation_show_labels_description": "Display text labels below navigation icons for better clarity and accessibility",
- "navigation_scroll_to_hide_label": "Scroll to Hide",
- "navigation_scroll_to_hide_description": "Automatically hide the navigation bar when scrolling down for a cleaner viewing experience",
"navigation_settings_saved": "Navigation settings saved successfully",
"navigation_desktop_sidebar_title": "Desktop Sidebar",
"navigation_desktop_sidebar_description": "Configure desktop sidebar behavior and appearance",
diff --git a/frontend/src/app.css b/frontend/src/app.css
index f5f9a4693..eb0b0bbc5 100644
--- a/frontend/src/app.css
+++ b/frontend/src/app.css
@@ -454,7 +454,7 @@ html,
body {
overflow-x: hidden;
max-width: 100vw;
- min-height: 100vh;
+ min-height: 100dvh;
}
body {
@@ -462,6 +462,16 @@ body {
flex-direction: column;
}
+/* iOS keyboard fix: prevent page from becoming scrollable when keyboard appears */
+@supports (-webkit-touch-callout: none) {
+ body {
+ /* On iOS, prevent the body from being scrollable beyond the visual viewport */
+ /* This prevents the auto-scroll that causes position:fixed elements to detach */
+ max-height: 100vh;
+ max-height: 100dvh;
+ }
+}
+
main {
min-width: 0;
max-width: 100%;
diff --git a/frontend/src/lib/components/mobile-nav/mobile-nav.svelte b/frontend/src/lib/components/mobile-nav/mobile-nav.svelte
index 3702cd968..dcd250bf8 100644
--- a/frontend/src/lib/components/mobile-nav/mobile-nav.svelte
+++ b/frontend/src/lib/components/mobile-nav/mobile-nav.svelte
@@ -63,16 +63,21 @@
// Enable touch gestures
$effect(() => {
+ scrollToHideEnabled;
return gestures.enableTouchGestures();
});
// Enable scroll gestures
$effect(() => {
+ scrollToHideEnabled;
+ menuOpen;
return gestures.enableScrollGestures();
});
// Enable wheel gestures on nav element
$effect(() => {
+ scrollToHideEnabled;
+ menuOpen;
if (navElement) {
gestures.setElement(navElement);
return gestures.enableWheelGestures();
diff --git a/frontend/src/lib/types/settings.type.ts b/frontend/src/lib/types/settings.type.ts
index 01caaf007..7173c4a9b 100644
--- a/frontend/src/lib/types/settings.type.ts
+++ b/frontend/src/lib/types/settings.type.ts
@@ -39,7 +39,6 @@ export type Settings = {
mobileNavigationMode: 'floating' | 'docked';
mobileNavigationShowLabels: boolean;
- mobileNavigationScrollToHide: boolean;
sidebarHoverExpansion: boolean;
glassEffectEnabled: boolean;
diff --git a/frontend/src/lib/utils/navigation.utils.ts b/frontend/src/lib/utils/navigation.utils.ts
index 4412e76a3..f9c04abfa 100644
--- a/frontend/src/lib/utils/navigation.utils.ts
+++ b/frontend/src/lib/utils/navigation.utils.ts
@@ -33,19 +33,18 @@ export function getEffectiveNavigationSettings(): MobileNavigationSettings {
return overrideValue !== undefined ? overrideValue : (serverValue ?? defaultValue);
};
+ const mode = getEffectiveValue(serverSettings?.mobileNavigationMode, overrides.mode, defaultMobileNavigationSettings.mode);
+
return {
pinnedItems: overrides.pinnedItems ?? currentPinnedItems.pinnedItems,
- mode: getEffectiveValue(serverSettings?.mobileNavigationMode, overrides.mode, defaultMobileNavigationSettings.mode),
+ mode,
showLabels: getEffectiveValue(
serverSettings?.mobileNavigationShowLabels,
overrides.showLabels,
defaultMobileNavigationSettings.showLabels
),
- scrollToHide: getEffectiveValue(
- serverSettings?.mobileNavigationScrollToHide,
- overrides.scrollToHide,
- defaultMobileNavigationSettings.scrollToHide
- )
+ // scrollToHide is now computed based on mode: always true for floating, always false for docked
+ scrollToHide: mode === 'floating'
};
}
diff --git a/frontend/src/lib/utils/settings.util.ts b/frontend/src/lib/utils/settings.util.ts
index ee55604d7..a9fb970b9 100644
--- a/frontend/src/lib/utils/settings.util.ts
+++ b/frontend/src/lib/utils/settings.util.ts
@@ -2,7 +2,6 @@ export type LocalSettings = {
accentColor: string;
mobileNavigationMode: string;
mobileNavigationShowLabels: boolean;
- mobileNavigationScrollToHide: boolean;
sidebarHoverExpansion: boolean;
glassEffectEnabled: boolean;
};
@@ -11,7 +10,6 @@ const LOCAL_SETTING_KEYS = new Set([
'accentColor',
'mobileNavigationMode',
'mobileNavigationShowLabels',
- 'mobileNavigationScrollToHide',
'sidebarHoverExpansion',
'glassEffectEnabled'
]);
diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte
index 92dd9cb69..ea1264782 100644
--- a/frontend/src/routes/+layout.svelte
+++ b/frontend/src/routes/+layout.svelte
@@ -22,6 +22,7 @@
import settingsStore from '$lib/stores/config-store';
import FirstLoginPasswordDialog from '$lib/components/dialogs/first-login-password-dialog.svelte';
import { invalidateAll } from '$app/navigation';
+ import { cn } from '$lib/utils';
let {
data,
@@ -106,23 +107,23 @@
<svelte:head><title>{m.layout_title()}</title></svelte:head>
-<div class={isGlassEnabled ? 'flex min-h-screen flex-col bg-transparent' : 'bg-background flex min-h-screen flex-col'}>
+<div class={cn('flex min-h-dvh flex-col', isGlassEnabled ? 'bg-transparent' : 'bg-background')}>
{#if !settings}
<Error message={m.error_occurred()} showButton={true} />
{:else if !isLoginPage}
{#if isMobile.current}
<main class="flex-1">
<section
- class={navigationMode === 'docked'
- ? navigationSettings.scrollToHide
- ? 'px-2 pt-5 sm:px-5 sm:pt-5'
- : 'px-2 pt-5 sm:p-5'
- : 'px-2 py-5 sm:p-5'}
- style={navigationMode === 'docked' && !navigationSettings.scrollToHide
- ? 'padding-bottom: var(--mobile-docked-nav-offset, calc(3.5rem + env(safe-area-inset-bottom)));'
- : navigationMode === 'floating' && !navigationSettings.scrollToHide
- ? 'padding-bottom: var(--mobile-floating-nav-offset, 6rem);'
- : ''}
+ class={cn(
+ 'px-2',
+ navigationMode === 'docked'
+ ? navigationSettings.scrollToHide
+ ? 'pt-5 sm:px-5 sm:pt-5'
+ : 'pt-5 pb-(--mobile-docked-nav-offset,calc(3.5rem+env(safe-area-inset-bottom))) sm:p-5'
+ : navigationSettings.scrollToHide
+ ? 'py-5 sm:p-5'
+ : 'py-5 pb-(--mobile-floating-nav-offset,6rem) sm:p-5'
+ )}
>
{@render children()}
</section>
diff --git a/frontend/src/routes/environments/[id]/+page.svelte b/frontend/src/routes/environments/[id]/+page.svelte
index 8a047eca1..25d1c4eba 100644
--- a/frontend/src/routes/environments/[id]/+page.svelte
+++ b/frontend/src/routes/environments/[id]/+page.svelte
@@ -363,15 +363,6 @@
/>
</div>
</div>
- <div>
- <Label class="text-muted-foreground text-sm font-medium">{m.navigation_scroll_to_hide_label()}</Label>
- <div class="mt-1">
- <StatusBadge
- text={settings.mobileNavigationScrollToHide ? m.common_enabled() : m.common_disabled()}
- variant={settings.mobileNavigationScrollToHide ? 'green' : 'gray'}
- />
- </div>
- </div>
</div>
</div>
{/if}
diff --git a/frontend/src/routes/settings/navigation/+page.svelte b/frontend/src/routes/settings/navigation/+page.svelte
index 6c25b52a7..b9467cd1f 100644
--- a/frontend/src/routes/settings/navigation/+page.svelte
+++ b/frontend/src/routes/settings/navigation/+page.svelte
@@ -6,7 +6,6 @@
import type { Settings } from '$lib/types/settings.type';
import { toast } from 'svelte-sonner';
import EyeIcon from '@lucide/svelte/icons/eye';
- import ScrollTextIcon from '@lucide/svelte/icons/scroll-text';
import NavigationIcon from '@lucide/svelte/icons/navigation';
import SidebarIcon from '@lucide/svelte/icons/sidebar';
import NavigationSettingControl from '$lib/components/navigation-setting-control.svelte';
@@ -29,7 +28,6 @@
const formSchema = z.object({
mobileNavigationMode: z.enum(['floating', 'docked']),
mobileNavigationShowLabels: z.boolean(),
- mobileNavigationScrollToHide: z.boolean(),
sidebarHoverExpansion: z.boolean()
});
@@ -50,7 +48,6 @@
() =>
$formInputs.mobileNavigationMode.value !== currentSettings.mobileNavigationMode ||
$formInputs.mobileNavigationShowLabels.value !== currentSettings.mobileNavigationShowLabels ||
- $formInputs.mobileNavigationScrollToHide.value !== currentSettings.mobileNavigationScrollToHide ||
$formInputs.sidebarHoverExpansion.value !== currentSettings.sidebarHoverExpansion
);
@@ -62,7 +59,7 @@
}
});
- function setLocalOverride(key: 'mode' | 'showLabels' | 'scrollToHide', value: any) {
+ function setLocalOverride(key: 'mode' | 'showLabels', value: any) {
const currentOverrides = navigationSettingsOverridesStore.current;
navigationSettingsOverridesStore.current = {
...currentOverrides,
@@ -70,21 +67,21 @@
};
persistedState = navigationSettingsOverridesStore.current;
- // Reset navigation bar visibility when behavior settings change
- if (key === 'scrollToHide') {
+ // Reset navigation bar visibility when mode changes (affects scroll-to-hide behavior)
+ if (key === 'mode') {
resetNavigationVisibility();
}
}
- function clearLocalOverride(key: 'mode' | 'showLabels' | 'scrollToHide') {
+ function clearLocalOverride(key: 'mode' | 'showLabels') {
const currentOverrides = navigationSettingsOverridesStore.current;
const newOverrides = { ...currentOverrides };
delete newOverrides[key];
navigationSettingsOverridesStore.current = newOverrides;
persistedState = navigationSettingsOverridesStore.current;
- // Reset navigation bar visibility when behavior settings change
- if (key === 'scrollToHide') {
+ // Reset navigation bar visibility when mode changes (affects scroll-to-hide behavior)
+ if (key === 'mode') {
resetNavigationVisibility();
}
@@ -111,15 +108,15 @@
}
isLoading = true;
- // Check if behavior settings changed
- const behaviorChanged = formData.mobileNavigationScrollToHide !== currentSettings.mobileNavigationScrollToHide;
+ // Check if mode changed (which affects scroll-to-hide behavior)
+ const modeChanged = formData.mobileNavigationMode !== currentSettings.mobileNavigationMode;
await updateSettingsConfig(formData)
.then(() => {
toast.success(m.navigation_settings_saved());
- // Reset navigation bar visibility if behavior settings changed
- if (behaviorChanged) {
+ // Reset navigation bar visibility if mode changed
+ if (modeChanged) {
resetNavigationVisibility();
}
})
@@ -133,7 +130,6 @@
function resetForm() {
$formInputs.mobileNavigationMode.value = currentSettings.mobileNavigationMode;
$formInputs.mobileNavigationShowLabels.value = currentSettings.mobileNavigationShowLabels;
- $formInputs.mobileNavigationScrollToHide.value = currentSettings.mobileNavigationScrollToHide;
}
onMount(() => {
@@ -163,7 +159,7 @@
<Card.Content class="px-3 py-3 sm:px-6 sm:py-4">
<div class="flex items-start gap-3 rounded-lg border p-3 sm:p-4">
<div
- class="bg-primary/10 text-primary ring-primary/20 flex size-7 flex-shrink-0 items-center justify-center rounded-lg ring-1 sm:size-8"
+ class="bg-primary/10 text-primary ring-primary/20 flex size-7 shrink-0 items-center justify-center rounded-lg ring-1 sm:size-8"
>
<SidebarIcon class="size-3 sm:size-4" />
</div>
@@ -239,33 +235,6 @@
</div>
</Card.Content>
</Card.Root>
-
- <Card.Root>
- <Card.Header icon={NavigationIcon}>
- <div class="flex flex-col space-y-1.5">
- <Card.Title>{m.navigation_mobile_behavior_title()}</Card.Title>
- <Card.Description>{m.navigation_mobile_behavior_description()}</Card.Description>
- </div>
- </Card.Header>
- <Card.Content class="px-3 py-3 sm:px-6 sm:py-4">
- <div class="grid grid-cols-1 gap-3 sm:gap-4 lg:grid-cols-[repeat(auto-fit,minmax(400px,1fr))]">
- <NavigationSettingControl
- id="mobileNavigationScrollToHide"
- label={m.navigation_scroll_to_hide_label()}
- description={m.navigation_scroll_to_hide_description()}
- icon={ScrollTextIcon}
- serverValue={$formInputs.mobileNavigationScrollToHide.value}
- localOverride={persistedState.scrollToHide}
- onServerChange={(value) => {
- $formInputs.mobileNavigationScrollToHide.value = value;
- }}
- onLocalOverride={(value) => setLocalOverride('scrollToHide', value)}
- onClearOverride={() => clearLocalOverride('scrollToHide')}
- serverDisabled={isReadOnly}
- />
- </div>
- </Card.Content>
- </Card.Root>
</div>
{/snippet}
</SettingsPageLayout>