-
Notifications
You must be signed in to change notification settings - Fork 404
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
Persist servers and allow adding/removing them from the UI #9086
Conversation
# Conflicts: # crates/viewer/re_redap_browser/src/servers.rs
Web viewer built successfully. If applicable, you should also test it:
Note: This comment is updated whenever you push a commit. |
# Conflicts: # Cargo.lock # crates/top/rerun/src/commands/entrypoint.rs # crates/utils/re_uri/src/lib.rs # crates/viewer/re_redap_browser/src/collection_ui.rs # crates/viewer/re_redap_browser/src/servers.rs # crates/viewer/re_viewer/src/app.rs
@@ -183,6 +183,7 @@ const_format = "0.2" | |||
convert_case = "0.6" | |||
criterion = "0.5" | |||
crossbeam = "0.8" | |||
crossbeam-channel = "0.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was already in the dependency tree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't venture too deep into the actual ui code, but data flow turned out nicely now I think :)
use re_viewer_context::{AsyncRuntimeHandle, WasmNotSend}; | ||
|
||
/// A handle to an object that is requested asynchronously. | ||
pub enum RequestedObject<T: Send + 'static> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this turned out really nice and short :)
pub fn ui(&self, ctx: &ViewerContext<'_>, ui: &mut egui::Ui) { | ||
//TODO(ab): we should display something even if no catalog is currently selected. | ||
fn add_server_modal_ui(&mut self, ui: &egui::Ui) { | ||
//TODO(ab): borrow checker doesn't let me use `with_ctx()` here, I should find a better way |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah that pattern is tricky, don't know either. Oooooonnneeee day the Polonius borrow checker will solve this, any decade now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in fairness, pulling that off would be pretty great!
What
With this PR, the servers are now persisted across viewer relaunch in the Redap browser, and the can be added and removed from the UI. The handling of the collection query management has been improved, so was its UI.
Note: this makes a pre-existing
crossbeam-channel
dependency explicit.Add/remove buttons:
Add server modal: