mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-16 13:57:02 +08:00
fix(web): remove edgeless mode padding (#2061)
This commit is contained in:
@@ -89,10 +89,13 @@ const BlockSuiteEditorImpl = (props: EditorProps): ReactElement => {
|
|||||||
container.removeChild(editor);
|
container.removeChild(editor);
|
||||||
};
|
};
|
||||||
}, [editor, page]);
|
}, [editor, page]);
|
||||||
|
|
||||||
|
// issue: https://github.com/toeverything/AFFiNE/issues/2004
|
||||||
|
const className = `editor-wrapper ${editor.mode}-mode`;
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-testid={`editor-${props.page.id}`}
|
data-testid={`editor-${props.page.id}`}
|
||||||
className="editor-wrapper"
|
className={className}
|
||||||
style={props.style}
|
style={props.style}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -194,6 +194,11 @@ input[type='number']::-webkit-outer-spin-button {
|
|||||||
padding: 0 2rem;
|
padding: 0 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* issue: https://github.com/toeverything/AFFiNE/issues/2004 */
|
||||||
|
.editor-wrapper.edgeless-mode {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.affine-default-page-block-title-container {
|
.affine-default-page-block-title-container {
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
margin-bottom: 40px;
|
margin-bottom: 40px;
|
||||||
@@ -222,4 +227,9 @@ affine-block-hub {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0 0.75rem;
|
padding: 0 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* issue: https://github.com/toeverything/AFFiNE/issues/2004 */
|
||||||
|
.editor-wrapper.edgeless-mode {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,13 @@ test('Switch to edgeless by switch edgeless item', async ({ page }) => {
|
|||||||
|
|
||||||
const edgeless = page.locator('affine-edgeless-page');
|
const edgeless = page.locator('affine-edgeless-page');
|
||||||
expect(await edgeless.isVisible()).toBe(true);
|
expect(await edgeless.isVisible()).toBe(true);
|
||||||
|
|
||||||
|
const editorWrapperPadding = await page
|
||||||
|
.locator('.editor-wrapper.edgeless-mode')
|
||||||
|
.evaluate(element => {
|
||||||
|
return window.getComputedStyle(element).getPropertyValue('padding');
|
||||||
|
});
|
||||||
|
expect(editorWrapperPadding).toBe('0px');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Convert to edgeless by editor header items', async ({ page }) => {
|
test('Convert to edgeless by editor header items', async ({ page }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user