mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-26 18:55:57 +08:00
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:
@@ -7,6 +7,7 @@ import {
|
||||
EmbedLoomModel,
|
||||
EmbedSyncedDocModel,
|
||||
EmbedYoutubeModel,
|
||||
SYNCED_DEFAULT_WIDTH,
|
||||
} from '@blocksuite/affine-model';
|
||||
|
||||
export const BLOCK_CHILDREN_CONTAINER_PADDING_LEFT = 24;
|
||||
@@ -29,7 +30,7 @@ export const EMBED_CARD_WIDTH: Record<EmbedCardStyle, number> = {
|
||||
video: 752,
|
||||
figma: 752,
|
||||
html: 752,
|
||||
syncedDoc: 800,
|
||||
syncedDoc: SYNCED_DEFAULT_WIDTH,
|
||||
pdf: 537 + 24 + 2,
|
||||
citation: 752,
|
||||
};
|
||||
|
||||
@@ -47,6 +47,7 @@ export class DNDAPIExtension extends Extension {
|
||||
...options.props,
|
||||
...(blockId ? { blockId } : {}),
|
||||
pageId: docId,
|
||||
style: flavour === 'affine:embed-synced-doc' ? 'syncedDoc' : 'vertical',
|
||||
};
|
||||
return {
|
||||
...snapshot,
|
||||
|
||||
Reference in New Issue
Block a user