From 0f010db22146348dad439d7cee669de876710267 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Fri, 12 Jun 2026 17:35:50 +0300 Subject: [PATCH] Anchor nprogress to main content (below header) --- app/components/layout/index.tsx | 8 ++++++++ app/root.tsx | 9 +++++++-- app/styles/common.css | 21 +++++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/app/components/layout/index.tsx b/app/components/layout/index.tsx index 0179dec2a..8175c9417 100644 --- a/app/components/layout/index.tsx +++ b/app/components/layout/index.tsx @@ -58,6 +58,13 @@ import { TopRightButtons } from "./TopRightButtons"; const MAX_DESKTOP_FRIENDS = 4; +/** Id of the loading-bar track rendered inside the header. NProgress mounts its + * bar into it; the track sits just below the header border, spans only the area + * between the sidebars, and clips the bar so it never extends over a sidebar. + * Living inside the header makes it follow the header on scroll and in + * standalone (PWA) mode where the header grows by the safe-area inset. */ +export const NPROGRESS_ANCHOR_ID = "nprogress-anchor"; + function useRelativeDayFormat() { const { i18n } = useTranslation(); const { formatter: timeFormatter } = useDateTimeFormat({ @@ -438,6 +445,7 @@ export function Layout({ } chatUnreadCount={chatContext?.totalUnreadCount} /> +
{showLeaderboard ? (