Merge pull request #2939 from appwrite/claude/fix-sidebar-load-KuiLD

Remove reactive subNavigation binding from page data
This commit is contained in:
Damodar Lohani
2026-03-29 12:58:09 +05:45
committed by GitHub
3 changed files with 7025 additions and 6 deletions
+7021
View File
File diff suppressed because it is too large Load Diff
-3
View File
@@ -1,11 +1,8 @@
<script lang="ts">
import { page } from '$app/state';
import { getContext } from 'svelte';
import type { Writable } from 'svelte/store';
export let subNavigation;
$: subNavigation = page.data.subNavigation;
// We need to have this second variable, because we only want narrow
// to change automatically if we change from having a second side nav to
// not having one, not when the second side nav changes to a different value.
+4 -3
View File
@@ -15,6 +15,7 @@
import { hasOnboardingDismissed } from '$lib/helpers/onboarding';
import { isSidebarOpen, noWidthTransition } from '$lib/stores/sidebar';
import { page } from '$app/state';
import { page as pageStore } from '$app/stores';
import { BillingPlanGroup, type Models } from '@appwrite.io/console';
import { getSidebarState, isInDatabasesRoute, updateSidebarState } from '$lib/helpers/sidebar';
import { isTabletViewport } from '$lib/stores/viewport';
@@ -191,7 +192,7 @@
$: state = $isSidebarOpen ? 'open' : 'closed';
$: subNavigation = page.data.subNavigation;
$: subNavigation = $pageStore.data.subNavigation;
$: shouldRenderSidebar =
!$isNewWizardStatusOpen && showSideNavigation && !$showOnboardingAnimation;
@@ -235,14 +236,14 @@
project={activeProject}
progressCard={getProgressCard()}
avatar={navbarProps.avatar}
bind:subNavigation
{subNavigation}
bind:sideBarIsOpen={$isSidebarOpen}
bind:showAccountMenu
bind:state />
{/if}
{#if !$showOnboardingAnimation}
<SideNavigation bind:subNavigation />
<SideNavigation {subNavigation} />
{/if}
</div>