From 5b8b2bbf487507bbae3c2e6a8b5344b447780cd4 Mon Sep 17 00:00:00 2001 From: fundon Date: Mon, 3 Jun 2024 02:13:24 +0000 Subject: [PATCH] fix(component): banner should not affect the editor layout (#7128) Same as #6605 --- .../component/src/components/affine-banner/index.css.ts | 3 ++- tests/affine-local/e2e/peek-view.spec.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/frontend/component/src/components/affine-banner/index.css.ts b/packages/frontend/component/src/components/affine-banner/index.css.ts index e003a5ae8b..bcadb24869 100644 --- a/packages/frontend/component/src/components/affine-banner/index.css.ts +++ b/packages/frontend/component/src/components/affine-banner/index.css.ts @@ -39,7 +39,8 @@ export const tipsContainer = style({ justifyContent: 'space-between', alignItems: 'center', padding: '12px 16px', - position: 'sticky', + position: 'absolute', + zIndex: 1, gap: '16px', containerType: 'inline-size', '@media': { diff --git a/tests/affine-local/e2e/peek-view.spec.ts b/tests/affine-local/e2e/peek-view.spec.ts index 0cea451fe8..d2a90752f3 100644 --- a/tests/affine-local/e2e/peek-view.spec.ts +++ b/tests/affine-local/e2e/peek-view.spec.ts @@ -121,6 +121,9 @@ test('can open peek view for embedded frames', async ({ page }) => { // enter F to create a frame await page.keyboard.press('f'); + // close affine-banner + await page.locator('[data-testid=local-demo-tips-close-button]').click(); + // insert the frame to page await page .locator('edgeless-change-frame-button:has-text("Insert into Page")')