Add drop feedback UX (#179434)

For #179430

Adds two new UX components:

- An inline progress icon shown when a drop operation takes over 500ms. This replaces the notification. You can click on it to cancel the drop

- Post drop, a drop feedback icon that lets you drop the file in a different way. This lets you drop the file as plain text for instance instead of as a markdown link
This commit is contained in:
Matt Bierner
2023-04-11 13:48:24 -07:00
committed by GitHub
parent 5d3f960b67
commit e9262678fa
22 changed files with 654 additions and 140 deletions

View File

@@ -2242,7 +2242,7 @@ class EditorDecorationsCollection implements editorCommon.IEditorDecorationsColl
this.set([]);
}
public set(newDecorations: IModelDeltaDecoration[]): void {
public set(newDecorations: readonly IModelDeltaDecoration[]): string[] {
try {
this._isChangingDecorations = true;
this._editor.changeDecorations((accessor) => {
@@ -2251,6 +2251,7 @@ class EditorDecorationsCollection implements editorCommon.IEditorDecorationsColl
} finally {
this._isChangingDecorations = false;
}
return this._decorationIds;
}
}