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

@@ -45,7 +45,7 @@ class PasteEditProvider implements vscode.DocumentPasteEditProvider {
}
const snippet = await tryGetUriListSnippet(document, dataTransfer, token);
return snippet ? new vscode.DocumentPasteEdit(snippet) : undefined;
return snippet ? new vscode.DocumentPasteEdit(snippet.snippet) : undefined;
}
private async _makeCreateImagePasteEdit(document: vscode.TextDocument, file: vscode.DataTransferFile, token: vscode.CancellationToken): Promise<vscode.DocumentPasteEdit | undefined> {