fix: page blink issue on navigation (#3833)
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
import { Content, displayFlex } from '@affine/component';
|
import { Content, displayFlex } from '@affine/component';
|
||||||
import { appSidebarResizingAtom } from '@affine/component/app-sidebar';
|
import {
|
||||||
|
AppSidebarFallback,
|
||||||
|
appSidebarResizingAtom,
|
||||||
|
} from '@affine/component/app-sidebar';
|
||||||
import { BlockHubWrapper } from '@affine/component/block-hub';
|
import { BlockHubWrapper } from '@affine/component/block-hub';
|
||||||
import { NotificationCenter } from '@affine/component/notification-center';
|
import { NotificationCenter } from '@affine/component/notification-center';
|
||||||
import type { DraggableTitleCellData } from '@affine/component/page-list';
|
import type { DraggableTitleCellData } from '@affine/component/page-list';
|
||||||
@@ -135,11 +138,9 @@ export const WorkspaceLayout = function WorkspacesSuspense({
|
|||||||
</CurrentWorkspaceContext>
|
</CurrentWorkspaceContext>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
<CurrentWorkspaceContext>
|
<CurrentWorkspaceContext>
|
||||||
<Suspense fallback={<WorkspaceFallback />}>
|
|
||||||
<Provider>
|
<Provider>
|
||||||
<WorkspaceLayoutInner>{children}</WorkspaceLayoutInner>
|
<WorkspaceLayoutInner>{children}</WorkspaceLayoutInner>
|
||||||
</Provider>
|
</Provider>
|
||||||
</Suspense>
|
|
||||||
</CurrentWorkspaceContext>
|
</CurrentWorkspaceContext>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
@@ -231,6 +232,7 @@ export const WorkspaceLayoutInner = ({ children }: PropsWithChildren) => {
|
|||||||
onDragEnd={handleDragEnd}
|
onDragEnd={handleDragEnd}
|
||||||
>
|
>
|
||||||
<AppContainer resizing={resizing}>
|
<AppContainer resizing={resizing}>
|
||||||
|
<Suspense fallback={<AppSidebarFallback />}>
|
||||||
<RootAppSidebar
|
<RootAppSidebar
|
||||||
isPublicWorkspace={false}
|
isPublicWorkspace={false}
|
||||||
onOpenQuickSearchModal={handleOpenQuickSearchModal}
|
onOpenQuickSearchModal={handleOpenQuickSearchModal}
|
||||||
@@ -248,6 +250,8 @@ export const WorkspaceLayoutInner = ({ children }: PropsWithChildren) => {
|
|||||||
currentPath={location.pathname.split('?')[0]}
|
currentPath={location.pathname.split('?')[0]}
|
||||||
paths={pathGenerator}
|
paths={pathGenerator}
|
||||||
/>
|
/>
|
||||||
|
</Suspense>
|
||||||
|
<Suspense fallback={<MainContainer />}>
|
||||||
<MainContainer padding={appSetting.clientBorder}>
|
<MainContainer padding={appSetting.clientBorder}>
|
||||||
{children}
|
{children}
|
||||||
<ToolContainer>
|
<ToolContainer>
|
||||||
@@ -255,6 +259,7 @@ export const WorkspaceLayoutInner = ({ children }: PropsWithChildren) => {
|
|||||||
<HelpIsland showList={pageId ? undefined : showList} />
|
<HelpIsland showList={pageId ? undefined : showList} />
|
||||||
</ToolContainer>
|
</ToolContainer>
|
||||||
</MainContainer>
|
</MainContainer>
|
||||||
|
</Suspense>
|
||||||
</AppContainer>
|
</AppContainer>
|
||||||
<PageListTitleCellDragOverlay />
|
<PageListTitleCellDragOverlay />
|
||||||
</DndContext>
|
</DndContext>
|
||||||
|
|||||||
Reference in New Issue
Block a user