-
-
Notifications
You must be signed in to change notification settings - Fork 21.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
Implement toast notifications in the editor #52940
Conversation
From an UI perspective, I'd increase the padding around the text and reduce the rounded corners (they look bad at higher radii when there's a highly visible border). |
9e6edb0
to
f553d34
Compare
I think it's a great idea. Also from an UI perspective:
Just my 2 cents. |
As for the fade duration, I suggest a few changes to improve usability in future PRs:
|
f553d34
to
84651fe
Compare
I don't think they look bad but ok, I'll reduce their size a bit (the radius is 5px here).
This is already implemented.
Yes, that makes sense.
I don't think this is worth a settings, whatever the situation you are in, you don't want to see your screen covered in messages. Since warning/errors end up in the output panel too, there's no need to disable this limit.
I can go that route. Though I was wondering if I could simply modify the time according to the string length instead ?
As mentioned, I implemented the "stay visible on hovering" thing, but it's a little bit more complex to reset the state. So for now it will disappear anyway if it started to fade out. It's not a big problem though, as the fade out animation is quite quick. As suggested by @fire on rocket chat, I can add a progress bar somewhere though, to notice the user of the timeout. It would be more obvious that the popup is about to disappear. |
84651fe
to
e58b874
Compare
You can already disable notifications by clicking the bell icon. It will still display the little red/yellow circle if messages popped up, but it wont show them. I I don't think configuring the max message is interesting. I limited things it to 5 notifications, and since messages are merged into a single notification when the String is the same, almost all messages are quite sure to be displayed anyway. So I would not bother adding a settings for that.
I can try something like that, I'll test that. |
e58b874
to
3ee3cf6
Compare
Regardless of interestingness, different users may have different opinions on what the "right" number of messages to show is—especially if custom editor tools and stuff can send them, or for people with and unusually large/small display. I think an editor option would be warranted. Also, not sure clicking the bell is the best button for toggling notifications. Personally, I would expect clicking it to bring me to a list of all the notifications that have been emitted—again, especially if these can come from custom scripts. |
Sorry I still don't think this is necessary. As mentioned, most messages will end up merged together, and I don't think there's any situation where you would need more than 5 different messages displayed at the same time. Even if triggered from scripts. As we usually do with Godot, I'd rather see someone facing the problem first instead of speculating that there will be a situation like that later on. Too many settings are bloating the settings area, making it more difficult to find the relevant ones, so we have to be careful there. That being said, I guess I could increase a little bit this number depending on the window's height, that could be useful on tall screens.
That's a good point. I am ok with this behavior but we need a quick way to disable the notifications too, and I'd rather not have two buttons next to each other. @EricEzaM 's solution would be ok, but the fact the icon is at the top would make it move up and down depending on the number of notifications. Also, that mean that the button would not be visible when notifications are hidden (though I guess we could make the main "show notifications" button re-activate the notifications then) |
745139a
to
7321129
Compare
I did not go in depth with reviewing this yet, but here is some feedback:
|
I think instead of removing the time animation a button to dismiss the notification could be added. React toast library with a lot of nice small micro interactions. |
I think I'll most likely make the fade-in faster, it should be fine. The dismiss button is a good idea though, I can add it I believe.
This is implemented. |
7321129
to
c6a55bb
Compare
I added a close button: Peek.30-09-2021.12-24.mp4 |
In your latest video, how come those two aren't collapsing into one? They are the same message, but it seems only the second instance merges duplicates? |
The error messages are the same but they don't have the same tooltip (the tooltip has the code file and line where the error happened). Since the two errors are triggered in different places they are kept separated. |
c6a55bb
to
afe8d00
Compare
afe8d00
to
651cb95
Compare
651cb95
to
ebb8e36
Compare
ebb8e36
to
c4af15e
Compare
417a4c5
to
477b2ad
Compare
477b2ad
to
0587e5e
Compare
Thanks! |
Chose to pass unhandled exceptions to the toaster, we might want to reconsider if those are already reported somewhere else (e.g. in the Mono panel).
TL; DR:
Feedback on duplicating errors/warnings as toastsFWIW after experiencing this in recent builds, I'm wondering what is the intended benefit of toasts for people using Godot? Godot is already quite "noisy"Even ignoring the pre-alpha nature of Godot nightly builds I already tend to feel that Godot is already rather "spammy" with error/warning messages that seem both not particularly important & not something I can really do anything about--which means I get in the habit of ignoring the error/warnings tabs because of the noise--and thus missing actual helpful errors/warnings. (And I'm someone who actually has some hope of deciphering the error/warning message, not someone making their first game in Godot who can't understand the message, let alone do anything about it.) I almost immediately turned off toastsSo, even aside from the multi-threading/recursion issues encountered subsequently, it only took me a short while before I turned the toast feature off entirely. Opportunities for refinementIn terms of specific feedback:
I would suggest not making existing warnings/errors into toasts automatically but only those which can be verified as actionable. An example "non-actionable" warning/error messageIn terms of a specific example even Godot 3.4 is still spamming this after I don't know how many years:
And current Godot 4 has upgraded this to an error, for some unknown reason (despite it still using
And now also repeats the message every time a tooltip is drawn (due to tooltips being separate windows, I guess):
From looking further into this particular case, I guess maybe it's useful to warn here: godot/platform/linuxbsd/display_server_x11.cpp Lines 4312 to 4314 in a000186
But given it seems that on any particular system if it fails once it's always going to fail, I don't think it's useful to report outside of And since we already know it's never going to succeed here, given godot/platform/linuxbsd/display_server_x11.cpp Lines 4115 to 4134 in a000186
So, in this particular case, the message is the result of one or more "bugs" or inefficiencies which lead to a whole lot of noise, every time you test a scene or pop-up a tooltip--now amplified by the toasts. But these "oh, wonder what that warning/error means, guess it's not important" occurrences are common enough that this certainly isn't the only case, just the one I've probably ignored the longest. :) Thanks for taking the time to consider this feedback. :) |
Other people asked for it. We'll have more feedback about it once alpha is out, and we'll see.
This is on purpose. I assume you are using development builds, where all errors are pushed as popups to help developers acknowledge errors in their code. For release builds, those won't trigger at all by default, which will lead to a lot less messages popping up. |
Base implementation for godotengine/godot-proposals#1489.
Old designs
![toast_notifications](https://user-images.githubusercontent.com/6093119/134377552-e57d925e-3cd0-4313-bb37-bf8b1a2c4916.gif) ![Peek 23-09-2021 17-16](https://user-images.githubusercontent.com/6093119/134535724-41c372df-3d90-4f3c-951c-804244fdd925.gif)Edit : New design:
For now, it only pops up the warning and error messages from the built-in error system (basically the ones we have in the output panel). I was not sure whether this was too much or not, but, in the editor, it makes a lot more noticeable some errors that could have been missed otherwise. I am in favor of keeping it, but well, it's to be discussed.
To be noted, this is also a simple way to trigger a message from code in the "/scene" folder. This is a quite useful feature that would be good to have anyway. Whatever we do, we should probably find a way to trigger a popup from the core or scene code anyway. (maybe a bool arg to ERR_FAIL_* ?).
I put it as draft so that we can discuss whether to add other things in the API, and because I need to implement a way to limit the amount of message on the screen.
Bugsquad edit: This closes godotengine/godot-proposals#1489.