Skip to content

Commit

Permalink
New notification system (#7339)
Browse files Browse the repository at this point in the history
This PR consists of two primary changes:
1. I've replaced `react-hot-toast` with `react-toastify` library. Both serve the same purpose — sending popup notifications (so-called "toasts"). However, the latter comes with a richer feature set that matches our requirements much better.
2. I've exposed the relevant API surface to the Rust. Now Rust code can easily send notifications.

### Important Notes
At this point, no attempt at customizing style of notifications was made (other than selecting the "light" theme). 

Likely we should consider this soon after integration as a separate task.
  • Loading branch information
mwu-tow authored and Frizi committed Jul 25, 2023
1 parent 2bdf83a commit 67d52fb
Show file tree
Hide file tree
Showing 33 changed files with 750 additions and 162 deletions.
18 changes: 16 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ debug-assertions = true
console-subscriber = "0.1.8"
nix = "0.26.1"
octocrab = { git = "https://github.com/enso-org/octocrab", default-features = false, features = [
"rustls"
"rustls",
] }
regex = { version = "1.6.0" }
serde_yaml = { version = "0.9.16" }
serde-wasm-bindgen = { version = "0.4.5" }
tokio = { version = "1.23.0", features = ["full", "tracing"] }
tokio-stream = { version = "0.1.12", features = ["fs"] }
tokio-util = { version = "0.7.4", features = ["full"] }
wasm-bindgen = { version = "0.2.84", features = ["serde-serialize"] }
wasm-bindgen = { version = "0.2.84", features = [] }
wasm-bindgen-test = { version = "0.3.34" }
anyhow = { version = "1.0.66" }
failure = { version = "0.1.8" }
Expand Down Expand Up @@ -135,7 +135,11 @@ syn = { version = "1.0", features = [
] }
quote = { version = "1.0.23" }
semver = { version = "1.0.0", features = ["serde"] }
strum = { version = "0.24.0", features = ["derive"] }
thiserror = "1.0.40"
bytemuck = { version = "1.13.1", features = ["derive"] }
bitflags = { version = "2.2.1" }
superslice = { version = "1.0.0" }
# We don't use serde-wasm-bindgen in some cases, because it cannot deal properly with flattened fields, see:
# https://github.com/cloudflare/serde-wasm-bindgen/issues/9
gloo-utils = { version = "0.1.7" }
2 changes: 1 addition & 1 deletion app/gui/controller/engine-protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mockall = { version = "0.7.1", features = ["nightly"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = { workspace = true }
sha3 = { version = "0.8.2" }
strum = "0.24.0"
strum = { workspace = true }
strum_macros = "0.24.0"
uuid = { version = "0.8", features = ["serde", "v4", "wasm-bindgen"] }

Expand Down
3 changes: 3 additions & 0 deletions app/gui/view/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ ide-view-documentation = { path = "documentation" }
ide-view-graph-editor = { path = "graph-editor" }
ide-view-project-view-top-bar = { path = "project-view-top-bar" }
span-tree = { path = "../language/span-tree" }
gloo-utils = { workspace = true }
js-sys = { workspace = true }
multi-map = { workspace = true }
nalgebra = { workspace = true }
ordered-float = { workspace = true }
serde_json = { workspace = true }
serde = { version = "1.0", features = ["derive"] }
strum = { workspace = true }
uuid = { version = "0.8", features = ["serde", "v4", "wasm-bindgen"] }
wasm-bindgen = { workspace = true }
wasm-bindgen-test = { workspace = true }
welcome-screen = { path = "welcome-screen" }

[dependencies.web-sys]
Expand Down
1 change: 1 addition & 0 deletions app/gui/view/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#[allow(clippy::option_map_unit_fn)]
pub mod code_editor;
pub mod debug_mode_popup;
pub mod notification;
pub mod popup;
pub mod project;
pub mod project_list;
Expand Down
Loading

0 comments on commit 67d52fb

Please sign in to comment.