diff --git a/apps/core/src/atoms/settings.ts b/apps/core/src/atoms/settings.ts index 7f0ed6f5cc..10b430f003 100644 --- a/apps/core/src/atoms/settings.ts +++ b/apps/core/src/atoms/settings.ts @@ -49,7 +49,7 @@ export const fontStyleOptions = [ }[]; const appSettingBaseAtom = atomWithStorage('affine-settings', { - clientBorder: globalThis.platform !== 'win32', + clientBorder: environment.isDesktop ? !environment.isWindows : false, fullWidthLayout: false, windowFrameStyle: 'frameless', fontStyle: 'Sans', diff --git a/apps/core/src/components/affine/app-container.tsx b/apps/core/src/components/affine/app-container.tsx index 61ef191d03..5cbc655f46 100644 --- a/apps/core/src/components/affine/app-container.tsx +++ b/apps/core/src/components/affine/app-container.tsx @@ -11,7 +11,11 @@ export const AppContainer = (props: WorkspaceRootProps) => { return ( ); diff --git a/apps/core/src/components/affine/setting-modal/general-setting/appearance/index.tsx b/apps/core/src/components/affine/setting-modal/general-setting/appearance/index.tsx index 81d8727aca..c0314655af 100644 --- a/apps/core/src/components/affine/setting-modal/general-setting/appearance/index.tsx +++ b/apps/core/src/components/affine/setting-modal/general-setting/appearance/index.tsx @@ -212,17 +212,19 @@ export const AppearanceSettings = () => { } /> - - - changeSwitch('enableBlurBackground', checked) - } - /> - + {environment.isMacOs && ( + + + changeSwitch('enableBlurBackground', checked) + } + /> + + )} ) : null} diff --git a/apps/core/src/components/affine/setting-modal/setting-sidebar/style.css.ts b/apps/core/src/components/affine/setting-modal/setting-sidebar/style.css.ts index a9af8c8a11..4c97e999c8 100644 --- a/apps/core/src/components/affine/setting-modal/setting-sidebar/style.css.ts +++ b/apps/core/src/components/affine/setting-modal/setting-sidebar/style.css.ts @@ -123,8 +123,8 @@ globalStyle(`${accountButton} .avatar.not-sign`, { display: 'flex', justifyContent: 'center', alignItems: 'center', - borderColor: 'var(--affine-border-color)', - color: 'var(--affine-border-color)', + borderColor: 'var(--affine-icon-secondary)', + color: 'var(--affine-icon-secondary)', background: 'var(--affine-white)', }); globalStyle(`${accountButton} .content`, { diff --git a/apps/core/src/components/pure/header/index.tsx b/apps/core/src/components/pure/header/index.tsx index 10c27a4fbd..66d1843718 100644 --- a/apps/core/src/components/pure/header/index.tsx +++ b/apps/core/src/components/pure/header/index.tsx @@ -1,4 +1,3 @@ -import { Wrapper } from '@affine/component'; import { appSidebarFloatingAtom, appSidebarOpenAtom, @@ -66,12 +65,8 @@ export const Header = forwardRef(function Header( })} >
-
- {!open && ( - - - - )} +
+
diff --git a/apps/core/src/components/pure/workspace-slider-bar/collections/styles.css.ts b/apps/core/src/components/pure/workspace-slider-bar/collections/styles.css.ts index b9fc05d9db..719f63d53c 100644 --- a/apps/core/src/components/pure/workspace-slider-bar/collections/styles.css.ts +++ b/apps/core/src/components/pure/workspace-slider-bar/collections/styles.css.ts @@ -77,10 +77,10 @@ export const collapsibleContent = style({ marginTop: '4px', selectors: { '&[data-state="open"]': { - animation: `${slideDown} 0.2s ease-out`, + animation: `${slideDown} 0.2s ease-in-out`, }, '&[data-state="closed"]': { - animation: `${slideUp} 0.2s ease-out`, + animation: `${slideUp} 0.2s ease-in-out`, }, }, }); diff --git a/apps/core/src/components/root-app-sidebar/index.tsx b/apps/core/src/components/root-app-sidebar/index.tsx index b719d806ec..40b8b08c0f 100644 --- a/apps/core/src/components/root-app-sidebar/index.tsx +++ b/apps/core/src/components/root-app-sidebar/index.tsx @@ -155,7 +155,13 @@ export const RootAppSidebar = ({ <> diff --git a/apps/storybook/src/stories/app-sidebar.stories.tsx b/apps/storybook/src/stories/app-sidebar.stories.tsx index 3fa62d54f2..88264b6195 100644 --- a/apps/storybook/src/stories/app-sidebar.stories.tsx +++ b/apps/storybook/src/stories/app-sidebar.stories.tsx @@ -2,6 +2,7 @@ import { AppSidebar, AppSidebarFallback, appSidebarOpenAtom, + SidebarSwitch, } from '@affine/component/app-sidebar'; import { AddPageButton } from '@affine/component/app-sidebar'; import { CategoryDivider } from '@affine/component/app-sidebar'; @@ -12,13 +13,8 @@ import { SidebarContainer, SidebarScrollableContainer, } from '@affine/component/app-sidebar'; -import { - DeleteTemporarilyIcon, - SettingsIcon, - SidebarIcon, -} from '@blocksuite/icons'; +import { DeleteTemporarilyIcon, SettingsIcon } from '@blocksuite/icons'; import type { Meta, StoryFn } from '@storybook/react'; -import { IconButton } from '@toeverything/components/button'; import { useAtom } from 'jotai'; import { type PropsWithChildren, useState } from 'react'; import { MemoryRouter } from 'react-router-dom'; @@ -45,20 +41,11 @@ const Container = ({ children }: PropsWithChildren) => ( ); const Main = () => { - const [open, setOpen] = useAtom(appSidebarOpenAtom); + const [open] = useAtom(appSidebarOpenAtom); return (
- {!open && ( - { - setOpen(true); - }} - > - - - )} +
); diff --git a/packages/component/src/components/app-sidebar/index.css.ts b/packages/component/src/components/app-sidebar/index.css.ts index 2443f1a599..25f377c32d 100644 --- a/packages/component/src/components/app-sidebar/index.css.ts +++ b/packages/component/src/components/app-sidebar/index.css.ts @@ -33,7 +33,7 @@ export const navWrapperStyle = style({ marginLeft: `calc(${navWidthVar} * -1)`, }, '&[data-enable-animation="true"]': { - transition: 'margin-left .3s, width .3s', + transition: 'margin-left .3s .05s, width .3s .05s', }, '&.has-background': { backgroundColor: 'var(--affine-white-60)', diff --git a/packages/component/src/components/app-sidebar/index.tsx b/packages/component/src/components/app-sidebar/index.tsx index aab102c6f5..384df5d5f1 100644 --- a/packages/component/src/components/app-sidebar/index.tsx +++ b/packages/component/src/components/app-sidebar/index.tsx @@ -102,8 +102,10 @@ export function AppSidebar(props: AppSidebarProps): ReactElement { (environment.isDesktop && props.hasBackground), })} data-open={open} + data-testid="app-sidebar-wrapper" data-is-macos-electron={isMacosDesktop} data-is-floating={appSidebarFloating} + data-has-background={props.hasBackground} data-enable-animation={enableAnimation && !isResizing} >