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

Adds toast support for user centered error handling #229

Merged
merged 4 commits into from
Mar 1, 2024

Conversation

naomijub
Copy link
Collaborator

@naomijub naomijub commented Feb 29, 2024

Captura de Tela 2024-02-28 às 7 54 50 PM

image

Adds toasts of type:

  • info
  • warning
  • success
  • error

Just need to add:

fn system_with_toast(
   // ...
  mut toasts: EventWriter<ToastMessage>,
) {
  // ...
  toasts.send_event(ToastMessage::new(
     &format!("Despawning {entity:?}"),
     egui_toast::ToastKind::Warning,
  ));
}

Copy link

codecov bot commented Feb 29, 2024

Codecov Report

Attention: Patch coverage is 70.68404% with 90 lines in your changes are missing coverage. Please review.

Project coverage is 25.32%. Comparing base (82b8287) to head (6a451c4).
Report is 1 commits behind head on main.

Files Patch % Lines
crates/editor_ui/src/menu_toolbars.rs 0.00% 55 Missing ⚠️
crates/editor_core/src/toast.rs 94.34% 13 Missing ⚠️
crates/editor_core/src/load.rs 0.00% 12 Missing ⚠️
crates/editor_ui/src/mouse_check.rs 0.00% 5 Missing ⚠️
crates/editor_ui/src/meshless_visualizer.rs 0.00% 4 Missing ⚠️
crates/editor_ui/src/lib.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #229      +/-   ##
==========================================
+ Coverage   23.52%   25.32%   +1.80%     
==========================================
  Files          55       56       +1     
  Lines        7648     7961     +313     
==========================================
+ Hits         1799     2016     +217     
- Misses       5849     5945      +96     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@naomijub naomijub requested a review from rewin123 March 1, 2024 00:25
@naomijub naomijub marked this pull request as ready for review March 1, 2024 00:25
@naomijub naomijub merged commit a65a40c into main Mar 1, 2024
8 checks passed
@naomijub naomijub deleted the error-handling-user branch March 1, 2024 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant