Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always resolve existing before showing new notification #13668

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

msujew
Copy link
Member

@msujew msujew commented Apr 29, 2024

What it does

Closes #13661

Using the vscode.window.show<Severity>Message API in VSCode behaves differently in Theia compared to VSCode when calling the method multiple times. Calling the method again with the same arguments will first off always resolve the previous call with undefined. Additionally, the newest message will always appear first in the toasts and notification center.

This change aligns Theia to this behavior.

How to test

  1. Download and install this text extension (a modified notification extension sample).
  2. Run the Show Info Notification and then the Show Warning Notification command. Both notifications should appear as expected
  3. Run the Show Info Notification again. The initial call should resolve with undefined (this is indicated in the backend console). The notification should appear as the first notification in the toasts/notification center.

Review checklist

Reminder for reviewers

@msujew msujew added notifications issues related to notifications vscode issues related to VSCode compatibility labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notifications issues related to notifications vscode issues related to VSCode compatibility
Projects
Status: Waiting on reviewers
Development

Successfully merging this pull request may close these issues.

Add the same message. This message is not displayed at the top of the notification window.
1 participant