mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
Switches all samples to use eslint 9 with flat configs. I've tried to migrate existing settings as much as possible. However our eslint configs were also inconsistent so I've tried to align these too
Notifications Sample
This sample showcases a handful of basic configurations for notifications in VS Code:
- Info Notification
- Info Notification as Modal
- Warning Notification
- Warning Notification with Actions
- Progress Notification
Read the Notifications UX Guidelines to learn how to effectively use notifications in an extension.
Demo
VS Code API
vscode module
commands.registerCommandwindow.showInformationMessagewindow.showWarningMessagewindow.showErrorMessagewindow.withProgress
Contribution Points
Running the Sample
- Run
npm installin terminal to install dependencies - Press F5 or Run the
Run Extensiontarget in the Debug View. This will:- Start a task
npm: watchto compile the code - Run the extension in a new VS Code window
- Start a task
- Try running the commands to show the notifications:
- Notifications Sample: Show Info Notification
- Notifications Sample: Show Info Notification as Modal
- Notifications Sample: Show Warning Notification
- Notifications Sample: Show Warning Notification with Actions
- Notifications Sample: Show Progress Notification
