-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Notification Messages: prepareMessages queue bug #34422
Comments
Please note that the message widget is considered deprecated and I suggest to stay away from touching it until we have a new system in place. Changing something there would be waste because we want to revisit notification system entirely (via #22388) which likely would result in a rewrite. |
I am not sure that is correct though, because a newer message should overwrite an existing one (it could have other actions). Anyhow, as I said before, this code is considered to be removed soon when we work on a new notification story... |
This landed via #43770 and can be tried out in our preview release: https://code.visualstudio.com/insiders/ |
@cleidigh maybe you verify this works with the new implementation |
@bpasero |
@cleidigh yeah or you write an extension that uses the API for showing messages and run that. |
@bpasero for steps |
@joaomoreno see #34422 (comment) @cleidigh did you try it out? |
@bpasero Go ahead and feel free to assign relevant issues for me to fix... |
@cleidigh thanks, happy for feedback |
Insiders 9-13-2017
Windows 7
While working on adding keyboard navigation (#32034) for global message notifications I ran into a tracking problem regarding how messages are queued and aggregated (eliminate common messages by text).
The problem is prepareMessages goes through the message queue from newest to oldest
messages. If a new message is added that matches an older message, it can take a slot
that is not rendered but, will bump the older message from the rendered list.
The fix is to go backwards in the global list and make sure the older messages are rendered
first.
I would like to do this PR before I do the full keyboard navigation PR.
Steps to reproduce (requires test code):
Create a TestMessages command
Create a TestMessages2 command
Execute TestMessages
Msg5
Msg4
Msg3
Msg2
Msg1
Execute TestMessages2
Msg6
Msg5
Msg4
Msg3
Msg2
Msg5
Msg4
Msg3
Msg2
Msg1
The proposed/tested fix:
scan the global message list backwards
build the rendered message list forward (oldest first)
reverse the list (now with oldest last)
Splice message array to only include maxMessages
private prepareMessages(): IMessageEntry[] {
}
The text was updated successfully, but these errors were encountered: