From 38492d58393819b7af514617cdffcc967684df1e Mon Sep 17 00:00:00 2001 From: Deepanshu <140803342+deepanshurajput0@users.noreply.github.com> Date: Fri, 6 Feb 2026 18:51:06 +0530 Subject: [PATCH] fix: prevent layout shift in sticky navbar (#27256) * fix navbar layout shift * fix: adjust layout for iPad breakpoints * fix: respect disableSticky for md+ header positioning * Fix sticky header condition in Shell component * Update apps/web/modules/event-types/components/EventTypeLayout.tsx Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> * Update apps/web/modules/shell/Shell.tsx Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> * Update apps/web/components/apps/layouts/AppsLayout.tsx Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> * Update apps/web/modules/event-types/components/EventTypeLayout.tsx Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> * Update packages/app-store/_components/AppCategoryNavigation.tsx Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> * Fix formatting in ShellMainAppDir component * Update apps/web/modules/shell/Shell.tsx Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> * Adjust layout styles for Shell component * Add dynamic header style based on banners height * fix respect disableSticky and add spacing to navbar elements * Refactor JSX structure in Shell component * Refactor header div and sticky behavior * Update AppsLayout.tsx * remove sticky navbar from app store * fix alignment --------- Co-authored-by: Deepanshu Verma Co-authored-by: Sahitya Chandra Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Dhairyashil Shinde <93669429+dhairyashiil@users.noreply.github.com> Co-authored-by: Dhairyashil --- apps/web/components/apps/layouts/AppsLayout.tsx | 2 +- apps/web/modules/shell/Shell.tsx | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/web/components/apps/layouts/AppsLayout.tsx b/apps/web/components/apps/layouts/AppsLayout.tsx index 0a89da7710..68ab006cfa 100644 --- a/apps/web/components/apps/layouts/AppsLayout.tsx +++ b/apps/web/components/apps/layouts/AppsLayout.tsx @@ -19,7 +19,7 @@ export default function AppsLayout({ children, actions, emptyStore, isAdmin, ... const router = useRouter(); return ( - +
{emptyStore ? ( diff --git a/apps/web/modules/shell/Shell.tsx b/apps/web/modules/shell/Shell.tsx index f861cb3df7..eaf62deb40 100644 --- a/apps/web/modules/shell/Shell.tsx +++ b/apps/web/modules/shell/Shell.tsx @@ -127,15 +127,22 @@ export default function Shell(props: LayoutProps) { export function ShellMain(props: LayoutProps) { const router = useRouter(); const { isLocaleReady } = useLocale(); + const { bannersHeight } = useBanners(); + + const headerStyle = + !props.disableSticky && bannersHeight + ? { top: `${bannersHeight}px` as const } + : undefined; return ( <> {(props.heading || !!props.backPath) && (
{!!props.backPath && (