mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 10:22:55 +08:00
refactor(core): minimize comment editor (#12995)
#### PR Dependency Tree * **PR #12995** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced a new clipboard module, making clipboard-related functionality available for external use. * Added a comprehensive extension system for the comment editor, supporting rich text features, widgets, and configurable options. * **Bug Fixes** * Improved stability by ensuring comment highlighting features and toolbar event subscriptions handle missing dependencies gracefully, preventing potential runtime errors. * **Refactor** * Simplified comment editor view manager setup for easier configuration and maintenance. * **Chores** * Updated package exports to expose new clipboard modules and configurations. * Removed confirm modal and portal-related logic from the comment editor component. * Adjusted temporary store creation to omit adding an extra surface block under the root page. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -579,9 +579,11 @@ export class AffineToolbarWidget extends WidgetComponent {
|
||||
);
|
||||
|
||||
// Handles elements when resizing
|
||||
const edgelessSlots = std.get(EdgelessLegacySlotIdentifier);
|
||||
disposables.add(edgelessSlots.elementResizeStart.subscribe(dragStart));
|
||||
disposables.add(edgelessSlots.elementResizeEnd.subscribe(dragEnd));
|
||||
const edgelessSlots = std.getOptional(EdgelessLegacySlotIdentifier);
|
||||
if (edgelessSlots) {
|
||||
disposables.add(edgelessSlots.elementResizeStart.subscribe(dragStart));
|
||||
disposables.add(edgelessSlots.elementResizeEnd.subscribe(dragEnd));
|
||||
}
|
||||
|
||||
// Handles elements when hovering
|
||||
disposables.add(
|
||||
|
||||
Reference in New Issue
Block a user