Skip to content

Commit

Permalink
fix(core): add margin to scrollbar when clientBorder has no style (#6867
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmFly committed May 11, 2024
1 parent e2b057c commit b8a1fbd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ export const affineDocViewport = style({
},
},
});

export const scrollbar = style({
marginRight: '4px',
});
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit b8a1fbd

Please sign in to comment.