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

Make Visible History UI more ergonomic and show inherited values #4222

Merged
merged 14 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions crates/re_data_store/src/entity_properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,26 +191,8 @@ pub enum VisibleHistoryBoundary {
}

impl VisibleHistoryBoundary {
/// UI label to use when [`VisibleHistoryBoundary::RelativeToTimeCursor`] is selected.
pub const RELATIVE_LABEL: &'static str = "Relative";

/// UI label to use when [`VisibleHistoryBoundary::Absolute`] is selected.
pub const ABSOLUTE_LABEL: &'static str = "Absolute";

/// UI label to use when [`VisibleHistoryBoundary::Infinite`] is selected.
pub const INFINITE_LABEL: &'static str = "Infinite";

/// Value when the boundary is set to the current time cursor.
pub const AT_CURSOR: Self = Self::RelativeToTimeCursor(0);

/// Label to use in the UI.
pub fn label(&self) -> &'static str {
match self {
Self::RelativeToTimeCursor(_) => Self::RELATIVE_LABEL,
Self::Absolute(_) => Self::ABSOLUTE_LABEL,
Self::Infinite => Self::INFINITE_LABEL,
}
}
}

impl Default for VisibleHistoryBoundary {
Expand Down Expand Up @@ -280,8 +262,10 @@ impl ExtraQueryHistory {
fn with_child(&self, child: &Self) -> Self {
if child.enabled {
*child
} else {
} else if self.enabled {
*self
} else {
Self::default()
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions crates/re_viewer/src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ mod welcome_screen;
pub(crate) mod memory_panel;
pub(crate) mod selection_panel;

pub(crate) mod visible_history;

pub use blueprint_panel::blueprint_panel_ui;
pub use recordings_panel::recordings_panel_ui;
// ----
Expand Down
Loading
Loading