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(editor): ui bugs in linked document embed view (#10105)
Olegb20d316d6014
diff --git a/blocksuite/affine/block-embed/src/embed-synced-doc-block/embed-edgeless-synced-doc-block.ts b/blocksuite/affine/block-embed/src/embed-synced-doc-block/embed-edgeless-synced-doc-block.tsindex 36080351fa..00600120de 100644--- a/blocksuite/affine/block-embed/src/embed-synced-doc-block/embed-edgeless-synced-doc-block.ts+++ b/blocksuite/affine/block-embed/src/embed-synced-doc-block/embed-edgeless-synced-doc-block.ts@@ -164,7 +164,7 @@ export class EmbedEdgelessSyncedDocBlockComponent extends toEdgelessEmbedBlock(this.cardStyleMap = {display: 'block',width: `${EMBED_CARD_WIDTH[style]}px`,- height: `${EMBED_CARD_WIDTH[style]}px`,+ height: `${EMBED_CARD_HEIGHT[style]}px`,transform: `scale(${bound.w / EMBED_CARD_WIDTH[style]}, ${bound.h / EMBED_CARD_HEIGHT[style]})`,transformOrigin: '0 0',};diff --git a/blocksuite/affine/block-embed/src/embed-synced-doc-block/styles.ts b/blocksuite/affine/block-embed/src/embed-synced-doc-block/styles.tsindex 0f8bb12162..d4b12ab6a6 100644--- a/blocksuite/affine/block-embed/src/embed-synced-doc-block/styles.ts+++ b/blocksuite/affine/block-embed/src/embed-synced-doc-block/styles.ts@@ -57,6 +57,7 @@ export const blockStyles = css`}.affine-embed-synced-doc-container {+ border: 1px solid var(--affine-border-color);border-radius: 8px;overflow: hidden;}@@ -69,12 +70,6 @@ export const blockStyles = css`width: 100%;height: calc(${EMBED_CARD_HEIGHT.syncedDoc}px + 36px);}- .affine-embed-synced-doc-container:hover.light {- box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.08);- }- .affine-embed-synced-doc-container:hover.dark {- box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.14);- }.affine-embed-synced-doc-header-wrapper {position: absolute;top: 0;@@ -127,9 +122,6 @@ export const blockStyles = css`z-index: 1;cursor: pointer;}- .affine-embed-synced-doc-editor-overlay:hover {- background: var(--affine-hover-color);- }.affine-embed-synced-doc-editor-empty {display: flex;diff --git a/blocksuite/affine/shared/src/consts/index.ts b/blocksuite/affine/shared/src/consts/index.tsindex ba79dfe727..4f6d911873 100644--- a/blocksuite/affine/shared/src/consts/index.ts+++ b/blocksuite/affine/shared/src/consts/index.ts@@ -29,7 +29,7 @@ export const EMBED_CARD_WIDTH: Record<EmbedCardStyle, number> = {video: 752,figma: 752,html: 752,- syncedDoc: 752,+ syncedDoc: 800,pdf: 537 + 24 + 2,};diff --git a/blocksuite/blocks/src/root-block/preview/preview-root-block.ts b/blocksuite/blocks/src/root-block/preview/preview-root-block.tsindex bad0402277..d1f8df06d8 100644--- a/blocksuite/blocks/src/root-block/preview/preview-root-block.ts+++ b/blocksuite/blocks/src/root-block/preview/preview-root-block.ts@@ -7,6 +7,7 @@ export class PreviewRootBlockComponent extends BlockComponent {static override styles = css`affine-preview-root {display: block;+ padding: 0 24px;}`;