diff --git a/ui/src/components/settings-sidebar.ts b/ui/src/components/settings-sidebar.ts index 385cef9293f5..a29fd1dfc7b0 100644 --- a/ui/src/components/settings-sidebar.ts +++ b/ui/src/components/settings-sidebar.ts @@ -198,6 +198,15 @@ function renderBlockItem(props: SettingsSidebarProps, block: SettingsSearchBlock `; } +function syncSettingsSearchScrollShadow(nav: HTMLElement) { + // The nav's top padding scrolls away with its rows. Keep the fixed search + // region visually separated once content reaches that boundary. + nav + .closest(".settings-sidebar") + ?.querySelector(".settings-sidebar__search") + ?.classList.toggle("settings-sidebar__search--scrolled", nav.scrollTop > 0); +} + export function renderSettingsSidebar(props: SettingsSidebarProps) { const gatewayStatus = t("chat.gatewayStatus", { status: props.connected ? t("common.online") : t("common.offline"), @@ -255,7 +264,12 @@ export function renderSettingsSidebar(props: SettingsSidebarProps) { ` : nothing} -