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): unable to hide doc info (#8658)

JimmFly1c22fdd3718f
diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-editor/lit-adaper.tsx b/packages/frontend/core/src/components/blocksuite/block-suite-editor/lit-adaper.tsx
index 13458e33ea..678cbe3132 100644
--- a/packages/frontend/core/src/components/blocksuite/block-suite-editor/lit-adaper.tsx
+++ b/packages/frontend/core/src/components/blocksuite/block-suite-editor/lit-adaper.tsx
@@ -247,6 +247,10 @@ export const BlocksuiteDocEditor = forwardRef<
)
);
+ const displayDocInfo = useLiveData(
+ editorSettingService.editorSetting.settings$.selector(s => s.displayDocInfo)
+ );
+
return (
<>
<div className={styles.affineDocViewport} style={{ height: '100%' }}>
@@ -255,7 +259,7 @@ export const BlocksuiteDocEditor = forwardRef<
) : (
<BlocksuiteEditorJournalDocTitle page={page} />
)}
- {!shared ? (
+ {!shared && displayDocInfo ? (
<DocPropertiesTable defaultOpenProperty={defaultOpenProperty} />
) : null}
<adapted.DocEditor
diff --git a/packages/frontend/core/src/components/doc-properties/table.css.ts b/packages/frontend/core/src/components/doc-properties/table.css.ts
index 5bb0358453..c5634db2a9 100644
--- a/packages/frontend/core/src/components/doc-properties/table.css.ts
+++ b/packages/frontend/core/src/components/doc-properties/table.css.ts
@@ -10,6 +10,7 @@ export const root = style({
width: '100%',
justifyContent: 'center',
fontFamily: cssVar('fontSansFamily'),
+ paddingBottom: '18px',
vars: {
[propertyNameCellWidth]: '160px',
[fontSize]: cssVar('fontSm'),
@@ -41,6 +42,7 @@ export const tableHeader = style({
display: 'flex',
height: 30,
padding: 4,
+ marginBottom: '8px',
justifyContent: 'space-between',
alignItems: 'center',
color: cssVarV2('text/secondary'),