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

Display toasts when using push_error() or push_warning() in a script #77890

Closed

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Jun 5, 2023

This only applies to scripts running within the editor itself, such as editor plugins and @tool scripts.

Text-based logging will also display those errors as userspace errors, as opposed to internal engine errors.

Testing project: test_toast.zip

Preview

Screenshot_20230605_212519

@Calinou Calinou requested a review from a team as a code owner June 5, 2023 19:28
@Calinou Calinou added this to the 4.x milestone Jun 5, 2023
This only applies to scripts running within the editor itself, such as
editor plugins and `@tool` scripts.

Text-based logging will also display those errors as userspace errors,
as opposed to internal engine errors.
@Calinou Calinou force-pushed the push-error-warning-display-toasts branch from a670608 to d9df169 Compare June 5, 2023 19:30
@Calinou Calinou requested a review from a team as a code owner June 5, 2023 19:30
@dalexeev
Copy link
Member

dalexeev commented Jun 6, 2023

I think Output Log and Toast Notifications have different purposes. The first is for a potentially large number of messages, which you can then leisurely read for debugging. The second is for a small number of messages that disappear very quickly, mostly to get the user's attention, but without requiring them to take any action.

It seems to me that it is not good to mix these two functions without the ability to control exactly where the message will be shown. Especially if we later expose the EditorToaster singleton.

push_* functions are for the debugger, which is not used when executing code in the editor. In theory, these functions should not be used in plugins/tools at all, but messages are displayed in the Output Log instead. People are used to this and this change can be inconvenient in some cases. Users may not want messages to be duplicated in toast notifications. Also, users may ask why toasts are not used when the code is executed in the game.

@KoBeWi
Copy link
Member

KoBeWi commented Feb 17, 2025

Editor toaster has been exposed in #98680. I think it's better to give users more control on how the messages appear and this PR ties editor log with the toaster. It's usually not desired.

@Calinou
Copy link
Member Author

Calinou commented Feb 18, 2025

Closing per @KoBeWi's comment.

@Calinou Calinou closed this Feb 18, 2025
@Calinou Calinou removed this from the 4.x milestone Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants