chore(editor): adjust size of synced doc (#12163)

Close [BS-3418](https://linear.app/affine-design/issue/BS-3418/折叠的embed-doc调整宽度时,会出现一个最小高度,不需要这个)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Improved resizing and folding interactions for embedded synced documents in edgeless mode, including dynamic height calculation and enhanced drag-handle styling.
- **Bug Fixes**
  - Adjusted minimum height for synced document embeds to allow more compact display.
  - Ensured consistent width settings across embed cards.
- **Tests**
  - Added end-to-end tests covering folding, unfolding, and resizing behaviors for edgeless synced document embeds.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
L-Sun
2025-05-14 05:17:42 +00:00
parent f737327f12
commit 3ebed1d5a8
12 changed files with 191 additions and 120 deletions
@@ -8,7 +8,8 @@ import {
} from './synced-doc-model.js';
export const SYNCED_MIN_WIDTH = 370;
export const SYNCED_MIN_HEIGHT = 64;
export const SYNCED_MIN_HEIGHT = 48;
export const SYNCED_DEFAULT_WIDTH = 800;
// the default max height of embed doc, user can adjust height by selected rect over this value
export const SYNCED_DEFAULT_MAX_HEIGHT = 800;
@@ -22,7 +23,7 @@ export const defaultEmbedSyncedDocBlockProps: EmbedSyncedDocBlockProps = {
title: undefined,
description: undefined,
index: 'a0',
xywh: `[0,0,${SYNCED_MIN_WIDTH},100]`,
xywh: `[0,0,${SYNCED_DEFAULT_WIDTH},100]`,
lockedBySelf: undefined,
};