Skip to content

Commit

Permalink
plural/singular fixes for visibletimeranges
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed May 2, 2024
1 parent 29fdf41 commit e91eebf
Show file tree
Hide file tree
Showing 34 changed files with 159 additions and 172 deletions.
2 changes: 1 addition & 1 deletion crates/re_query/src/latest_at/to_archetype/.gitattributes

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

2 changes: 1 addition & 1 deletion crates/re_query/src/latest_at/to_archetype/mod.rs

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

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

2 changes: 1 addition & 1 deletion crates/re_space_view/src/space_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ impl SpaceViewBlueprint {
// * can't be specified in the data store
// Here, we query the visual time range that serves as the default for all entities in this space.
let (visible_time_range_archetype, _) = crate::query_view_property::<
blueprint_archetypes::VisibleTimeRange,
blueprint_archetypes::VisibleTimeRanges,
>(self.id, blueprint, blueprint_query);

let visible_time_range_archetype = visible_time_range_archetype.ok().flatten();
Expand Down
2 changes: 1 addition & 1 deletion crates/re_space_view/src/space_view_contents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ impl DataQueryPropertyResolver<'_> {

// Figure out relevant visual time range.
let visible_time_range_archetype = blueprint
.latest_at_archetype::<blueprint_archetypes::VisibleTimeRange>(
.latest_at_archetype::<blueprint_archetypes::VisibleTimeRanges>(
&recursive_override_path,
blueprint_query,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,10 @@ namespace rerun.blueprint.archetypes;

// ---

/// Configures what range of the timeline is shown on a view.
/// Configures what range of each timeline is shown on a view.
///
/// Whenever no visual time range applies, queries are done with "latest at" semantics.
/// This means that the view will, starting from the time cursor position,
/// query the latest data available for each component type.
///
/// The default visual time range depends on the type of view this property applies to:
/// - For time series views, the default is to show the entire timeline.
/// - For any other view, the default is to apply latest-at semantics.
///
/// The visual time range can be overridden also individually per entity.
table VisibleTimeRange (
/// Refer to [`VisibleTimeRange`] component for more information.
table VisibleTimeRanges (
"attr.rerun.scope": "blueprint",
"attr.rust.derive": "Default"
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ namespace rerun.blueprint.components;
// ---

/// The range of values on a given timeline that will be included in a view's query.
///
/// Whenever no visual time range applies, queries are done with "latest at" semantics.
/// This means that the view will, starting from the time cursor position,
/// query the latest data available for each component type.
///
/// The default visual time range depends on the type of view this property applies to:
/// - For time series views, the default is to show the entire timeline.
/// - For any other view, the default is to apply latest-at semantics.
///
/// The visual time range(s) can be overridden also individually per entity.
table VisibleTimeRange (
"attr.arrow.transparent",
"attr.rerun.scope": "blueprint",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ table Spatial2DView (
/// Somethings outside of these bounds may also be visible due to letterboxing.
visual_bounds: rerun.blueprint.archetypes.VisualBounds (order: 2000);

/// Configures the range on the timeline shown by this view (unless specified differently per entity).
time_range: rerun.blueprint.archetypes.VisibleTimeRange (order: 10000);
/// Configures which range on each timeline is shown by this view (unless specified differently per entity).
time_ranges: rerun.blueprint.archetypes.VisibleTimeRanges (order: 10000);

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ table Spatial3DView (
/// Configuration for the background of the space view.
background: rerun.blueprint.archetypes.Background (order: 1000);

/// Configures the range on the timeline shown by this view (unless specified differently per entity).
time_range: rerun.blueprint.archetypes.VisibleTimeRange (order: 2000);
/// Configures which range on each timeline is shown by this view (unless specified differently per entity).
time_ranges: rerun.blueprint.archetypes.VisibleTimeRanges (order: 10000);
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ table TimeSeriesView (
/// Configures the legend of the plot.
plot_legend: rerun.blueprint.archetypes.PlotLegend (order: 2000);

/// Configures the time range the plot covers (unless specified differently per entity).
time_range: rerun.blueprint.archetypes.VisibleTimeRange (order: 3000);
/// Configures which range on each timeline is shown by this view (unless specified differently per entity).
time_ranges: rerun.blueprint.archetypes.VisibleTimeRanges (order: 10000);
}
2 changes: 1 addition & 1 deletion crates/re_types/src/blueprint/archetypes/.gitattributes

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

6 changes: 3 additions & 3 deletions crates/re_types/src/blueprint/archetypes/mod.rs

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

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

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use re_types_core::datatypes::TimeRange;

use super::VisibleTimeRange;
use super::VisibleTimeRanges;

impl VisibleTimeRange {
impl VisibleTimeRanges {
/// Retrieves the time range for a given timeline.
pub fn range_for_timeline(&self, timeline_name: &str) -> Option<&'_ TimeRange> {
self.ranges
Expand Down
10 changes: 10 additions & 0 deletions crates/re_types/src/blueprint/components/visible_time_range.rs

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

8 changes: 4 additions & 4 deletions crates/re_types/src/blueprint/views/spatial2d_view.rs

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

8 changes: 4 additions & 4 deletions crates/re_types/src/blueprint/views/spatial3d_view.rs

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

8 changes: 4 additions & 4 deletions crates/re_types/src/blueprint/views/time_series_view.rs

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

6 changes: 3 additions & 3 deletions crates/re_viewer/src/ui/query_range_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub fn query_range_ui_space_view(
}

let property_path = entity_path_for_view_property::<
re_types::blueprint::archetypes::VisibleTimeRange,
re_types::blueprint::archetypes::VisibleTimeRanges,
>(space_view.id, ctx.store_context.blueprint.tree());

let query_range = space_view.query_range(
Expand Down Expand Up @@ -88,7 +88,7 @@ fn visible_time_range_ui(
let visible_time_ranges = ctx
.store_context
.blueprint
.latest_at_archetype::<re_types::blueprint::archetypes::VisibleTimeRange>(
.latest_at_archetype::<re_types::blueprint::archetypes::VisibleTimeRanges>(
time_range_override_path,
ctx.blueprint_query,
)
Expand Down Expand Up @@ -132,7 +132,7 @@ fn save_visible_time_ranges(
has_individual_range: bool,
query_range: QueryRange,
property_path: EntityPath,
mut visible_time_ranges: re_types::blueprint::archetypes::VisibleTimeRange,
mut visible_time_ranges: re_types::blueprint::archetypes::VisibleTimeRanges,
) {
if has_individual_range {
let time_range = match query_range {
Expand Down
Loading

0 comments on commit e91eebf

Please sign in to comment.