From b7ade43c2e5c5832334330abe8688e667fd5b577 Mon Sep 17 00:00:00 2001 From: EYHN Date: Mon, 22 Apr 2024 08:27:27 +0000 Subject: [PATCH] feat(core): adjust help island style (#6651) --- .../frontend/core/src/components/workspace/index.css.ts | 2 +- .../core/src/modules/right-sidebar/view/container.tsx | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/frontend/core/src/components/workspace/index.css.ts b/packages/frontend/core/src/components/workspace/index.css.ts index 9674608a58..4a7866363f 100644 --- a/packages/frontend/core/src/components/workspace/index.css.ts +++ b/packages/frontend/core/src/components/workspace/index.css.ts @@ -89,7 +89,7 @@ export const toolStyle = style({ position: 'absolute', right: '30px', bottom: '30px', - zIndex: cssVar('zIndexPopover'), + zIndex: 1, display: 'flex', flexDirection: 'column', gap: '12px', diff --git a/packages/frontend/core/src/modules/right-sidebar/view/container.tsx b/packages/frontend/core/src/modules/right-sidebar/view/container.tsx index 4e50e636d5..a45fafa55f 100644 --- a/packages/frontend/core/src/modules/right-sidebar/view/container.tsx +++ b/packages/frontend/core/src/modules/right-sidebar/view/container.tsx @@ -3,7 +3,6 @@ import { appSettingAtom, useLiveData, useService } from '@toeverything/infra'; import { useAtomValue } from 'jotai'; import { useCallback, useEffect, useState } from 'react'; -import { appSidebarOpenAtom } from '../../../components/app-sidebar/index.jotai'; import { RightSidebarService } from '../services/right-sidebar'; import * as styles from './container.css'; import { Header } from './header'; @@ -20,17 +19,15 @@ export const RightSidebarContainer = () => { const frontView = useLiveData(rightSidebar.front$); const open = useLiveData(rightSidebar.isOpen$) && frontView !== undefined; const [floating, setFloating] = useState(false); - const appSidebarOpened = useAtomValue(appSidebarOpenAtom); useEffect(() => { - const onResize = () => - setFloating(!!(window.innerWidth < 1200 && appSidebarOpened)); + const onResize = () => setFloating(!!(window.innerWidth < 768)); onResize(); window.addEventListener('resize', onResize); return () => { window.removeEventListener('resize', onResize); }; - }, [appSidebarOpened]); + }, []); const handleOpenChange = useCallback( (open: boolean) => {