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.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix(core): editor height incorrect (#3799)
Alex Yangc3e465d64483
diff --git a/apps/core/src/components/page-detail-editor.tsx b/apps/core/src/components/page-detail-editor.tsxindex a57d0d5899..9da27036dc 100644--- a/apps/core/src/components/page-detail-editor.tsx+++ b/apps/core/src/components/page-detail-editor.tsx@@ -177,12 +177,7 @@ const LayoutPanel = memo(function LayoutPanel(}} else {return (- <PanelGroup- style={{- height: 'calc(100% - 52px)',- }}- direction={node.direction}- >+ <PanelGroup direction={node.direction}><PaneldefaultSize={node.splitPercentage}style={{@@ -219,6 +214,18 @@ export const PageDetailEditor = (props: PageDetailEditorProps) => {const layout = useAtomValue(contentLayoutAtom);+ if (layout === 'editor') {+ return (+ <Suspense>+ <PanelGroup direction="horizontal">+ <Panel>+ <EditorWrapper {...props} />+ </Panel>+ </PanelGroup>+ </Suspense>+ );+ }+return (<><Suspense>diff --git a/apps/electron/e2e/basic.spec.ts b/apps/electron/e2e/basic.spec.tsindex ab9cf30ce3..b6cb233e17 100644--- a/apps/electron/e2e/basic.spec.ts+++ b/apps/electron/e2e/basic.spec.ts@@ -117,7 +117,7 @@ test('affine cloud disabled', async ({ page }) => {});await page.waitForSelector('v-line');await page.getByTestId('current-workspace').click();- await page.getByTestId('sign-in-button').click();+ await page.getByTestId('cloud-signin-button').click();await page.getByTestId('disable-affine-cloud-modal').waitFor({state: 'visible',});@@ -153,13 +153,23 @@ test('windows only check', async ({ page }) => {test('delete workspace', async ({ page }) => {await page.getByTestId('current-workspace').click();- await page.getByTestId('add-or-new-workspace').click();await page.getByTestId('new-workspace').click();- await page.getByTestId('create-workspace-default-location-button').click();- await page.getByTestId('create-workspace-input').type('Delete Me');- await page.getByTestId('create-workspace-create-button').click();- await page.getByTestId('create-workspace-continue-button').click();- await page.getByTestId('slider-bar-workspace-setting-button').click();+ await page.getByTestId('create-workspace-default-location-button').click({+ delay: 100,+ });+ await page.getByTestId('create-workspace-input').type('Delete Me', {+ delay: 100,+ });+ await page.getByTestId('create-workspace-create-button').click({+ delay: 100,+ });+ await page.getByTestId('create-workspace-continue-button').click({+ delay: 100,+ });+ await page.waitForTimeout(1000);+ await page.getByTestId('current-workspace').click();+ await page.getByTestId('workspace-card').nth(1).hover();+ await page.getByTestId('workspace-card-setting-button').nth(1).click();await page.getByTestId('current-workspace-label').click();expect(await page.getByTestId('workspace-name-input').inputValue()).toBe('Delete Me'diff --git a/packages/component/src/components/card/workspace-card/index.tsx b/packages/component/src/components/card/workspace-card/index.tsxindex c0c3bf632d..e769809c9f 100644--- a/packages/component/src/components/card/workspace-card/index.tsx+++ b/packages/component/src/components/card/workspace-card/index.tsx@@ -104,6 +104,7 @@ export const WorkspaceCard = ({</StyledWorkspaceInfo><StyledSettingLinkclassName="setting-entry"+ data-testid="workspace-card-setting-button"onClick={e => {e.stopPropagation();onSettingClick(meta.id);