fix: move help land position (#6571)

Before:
<img width="1614" alt="image" src="https://github.com/toeverything/AFFiNE/assets/58546692/24d4c550-4070-48a5-a851-40d6f26ea120">

After:
<img width="1106" alt="image" src="https://github.com/toeverything/AFFiNE/assets/58546692/88e1b7ea-8a69-45a2-9beb-780dfd1bd996">
<img width="949" alt="image" src="https://github.com/toeverything/AFFiNE/assets/58546692/8fd328c5-e8e8-402a-b18e-436056d2374f">

Cause the icon will be on top of chat input.
This commit is contained in:
regischen
2024-04-16 08:11:37 +00:00
parent ebb38a42a0
commit 0ca8a23dd8
3 changed files with 9 additions and 11 deletions

View File

@@ -11,6 +11,7 @@ export const splitViewRoot = style({
}, },
display: 'flex', display: 'flex',
flexDirection: 'row', flexDirection: 'row',
position: 'relative',
borderRadius, borderRadius,
gap, gap,

View File

@@ -1,3 +1,4 @@
import { HubIsland } from '@affine/core/components/affine/hub-island';
import { useAppSettingHelper } from '@affine/core/hooks/affine/use-app-setting-helper'; import { useAppSettingHelper } from '@affine/core/hooks/affine/use-app-setting-helper';
import type { DragEndEvent } from '@dnd-kit/core'; import type { DragEndEvent } from '@dnd-kit/core';
import { import {
@@ -108,6 +109,7 @@ export const SplitView = ({
data-client-border={appSettings.clientBorder} data-client-border={appSettings.clientBorder}
{...attrs} {...attrs}
> >
<HubIsland />
<DndContext <DndContext
sensors={sensors} sensors={sensors}
collisionDetection={closestCenter} collisionDetection={closestCenter}

View File

@@ -1,4 +1,3 @@
import { HubIsland } from '@affine/core/components/affine/hub-island';
import { useLiveData, useService } from '@toeverything/infra'; import { useLiveData, useService } from '@toeverything/infra';
import { useCallback, useEffect, useRef } from 'react'; import { useCallback, useEffect, useRef } from 'react';
import { useLocation } from 'react-router-dom'; import { useLocation } from 'react-router-dom';
@@ -44,16 +43,12 @@ export const WorkbenchRoot = () => {
}, [basename, workbench.basename$]); }, [basename, workbench.basename$]);
return ( return (
<> <SplitView
<HubIsland /> className={styles.workbenchRootContainer}
views={views}
<SplitView renderer={panelRenderer}
className={styles.workbenchRootContainer} onMove={onMove}
views={views} />
renderer={panelRenderer}
onMove={onMove}
/>
</>
); );
}; };