Closed Bistard closed 2 weeks ago
This PR introduces several significant changes to improve drag-and-drop functionality, animation handling, and event management in the editor. The implementation includes new animation controllers, enhanced drop cursor rendering, and reorganized event handling for better performance and user experience.
sequenceDiagram
actor User
participant EditorWidget
participant DropCursorRenderer
participant ScrollOnEdgeController
participant DropBlinkRenderer
User->>EditorWidget: Drag event
EditorWidget->>DropCursorRenderer: render(view, event)
DropCursorRenderer->>ScrollOnEdgeController: attemptScrollOnEdge(event)
ScrollOnEdgeController->>DropBlinkRenderer: setNodeBlink(view, position, nodeSize)
DropBlinkRenderer-->>EditorWidget: Update decorations
EditorWidget-->>User: Render updated view
Change | Details | Files |
---|---|---|
Introduced a new RequestAnimateController class for managing animation frame requests |
|
src/base/browser/basic/animation.ts |
Enhanced drag-and-drop functionality with new features and optimizations |
|
src/editor/contrib/dragAndDropExtension/dragAndDropExtension.ts src/editor/contrib/dragAndDropExtension/dropCursorRenderer.ts src/editor/contrib/dragAndDropExtension/dropBlinkRenderer.ts src/editor/contrib/dragAndDropExtension/scrollOnEdgeController.ts |
Refactored editor event handling system |
|
src/editor/common/editorExtension.ts src/editor/view/proseEventBroadcaster.ts src/editor/editorWidget.ts |
Improved Mac window bar styling and zoom handling |
|
src/workbench/parts/navigationPanel/navigationBar/quickAccessBar/media/macWindowBar.scss src/workbench/parts/navigationPanel/navigationBar/quickAccessBar/macWindowBar.ts src/workbench/services/zoom/zoomService.ts |
@sourcery-ai review
Summary by Sourcery
Refactor the editor's drag-and-drop functionality by introducing new animation controls and enhancing existing components. Add a drop animation feature and automated scrolling on edge detection to improve user interaction. Update the styling and functionality of the MacWindowBar and integrate it with the zoom service.
New Features:
Enhancements: