-
Notifications
You must be signed in to change notification settings - Fork 373
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
Show all loaded applications in recordings panel #5766
Merged
Merged
Changes from 9 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
3fb7d58
When activating a blueprint, switch to its application id
emilk fc6d4db
Make application ID selectable
emilk f45c0eb
Always select the new recording
emilk c320b22
Show all blueprints in the recordings panel
emilk 8410a2c
Show welcome screen as a special app
emilk 139e75d
Add ability to close an application
emilk 17df4ac
Close application when closing the last recording in it
emilk 377595e
When clearing the recordings, clear the applications too
emilk 3407c1b
Indent the recordings
emilk 96efafd
Sort stores by activation time
emilk 6b3f7bd
Add ability to hide the welcome screen button
emilk 846b461
Merge branch 'main' into emilk/select-app-id
emilk c9ac328
Fix doclinks
emilk 9437162
Fix doc-links again
emilk de52f74
Fix `ListItem` export
emilk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
use re_entity_db::EntityDb; | ||
use re_log_types::ApplicationId; | ||
use re_viewer_context::{UiVerbosity, ViewerContext}; | ||
|
||
use crate::item_ui::entity_db_button_ui; | ||
|
||
impl crate::DataUi for ApplicationId { | ||
fn data_ui( | ||
&self, | ||
ctx: &ViewerContext<'_>, | ||
ui: &mut egui::Ui, | ||
verbosity: UiVerbosity, | ||
_query: &re_data_store::LatestAtQuery, | ||
_store: &re_data_store::DataStore, | ||
) { | ||
egui::Grid::new("application_id") | ||
.num_columns(2) | ||
.show(ui, |ui| { | ||
ui.label("Application ID"); | ||
ui.label(self.to_string()); | ||
if self == &ctx.store_context.app_id { | ||
ui.label("(active)"); | ||
} | ||
ui.end_row(); | ||
}); | ||
|
||
if verbosity == UiVerbosity::Small { | ||
return; | ||
} | ||
|
||
// Find all recordings with this app id | ||
let recordings: Vec<&EntityDb> = ctx | ||
.store_context | ||
.bundle | ||
.recordings() | ||
.filter(|db| db.app_id() == Some(self)) | ||
.collect(); | ||
|
||
if !recordings.is_empty() { | ||
ui.scope(|ui| { | ||
ui.set_clip_rect(ui.max_rect()); // TODO(#5740): Hack required because `entity_db_button_ui` uses `ListItem`, which fills the full width until the clip rect. | ||
ui.spacing_mut().item_spacing.y = 0.0; | ||
|
||
ui.add_space(8.0); | ||
ui.strong("Loaded recordings for this app"); | ||
for entity_db in recordings { | ||
entity_db_button_ui(ctx, ui, entity_db, true); | ||
} | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Would be nice to have the blueprints here as well.
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.
Maybe, but could also be very confusing. Do we show all the blueprints? Or just the active and default ones? What if the active and default are the same? Etc. I opted to keep it simple for now.