Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): add margin to scrollbar when clientBorder has no style (#6867)

JimmFlyb8a1fbd6c7ed
diff --git a/packages/frontend/core/src/pages/workspace/detail-page/detail-page.css.ts b/packages/frontend/core/src/pages/workspace/detail-page/detail-page.css.ts
index 784bc72a03..57be2882e9 100644
--- a/packages/frontend/core/src/pages/workspace/detail-page/detail-page.css.ts
+++ b/packages/frontend/core/src/pages/workspace/detail-page/detail-page.css.ts
@@ -32,3 +32,7 @@ export const affineDocViewport = style({
},
},
});
+
+export const scrollbar = style({
+ marginRight: '4px',
+});
diff --git a/packages/frontend/core/src/pages/workspace/detail-page/detail-page.tsx b/packages/frontend/core/src/pages/workspace/detail-page/detail-page.tsx
index 25cca55be0..dc00ff00c7 100644
--- a/packages/frontend/core/src/pages/workspace/detail-page/detail-page.tsx
+++ b/packages/frontend/core/src/pages/workspace/detail-page/detail-page.tsx
@@ -1,6 +1,7 @@
import { Scrollable } from '@affine/component';
import { PageDetailSkeleton } from '@affine/component/page-detail-skeleton';
import { PageAIOnboarding } from '@affine/core/components/affine/ai-onboarding';
+import { useAppSettingHelper } from '@affine/core/hooks/affine/use-app-setting-helper';
import type { PageRootService } from '@blocksuite/blocks';
import {
BookmarkService,
@@ -90,6 +91,7 @@ const DetailPageImpl = memo(function DetailPageImpl() {
const rightSidebar = useService(RightSidebarService).rightSidebar;
const docCollection = workspace.docCollection;
const mode = useLiveData(doc.mode$);
+ const { appSettings } = useAppSettingHelper();
const isActiveView = useIsActiveView();
// TODO: remove jotai here
@@ -252,7 +254,11 @@ const DetailPageImpl = memo(function DetailPageImpl() {
docCollection={docCollection}
/>
</Scrollable.Viewport>
- <Scrollable.Scrollbar />
+ <Scrollable.Scrollbar
+ className={clsx({
+ [styles.scrollbar]: !appSettings.clientBorder,
+ })}
+ />
</Scrollable.Root>
</AffineErrorBoundary>
{isInTrash ? <TrashPageFooter /> : null}