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

Only show the LegacyVisualizer if a user logs with TimeSeriesScalar archetype #5023

Merged
merged 1 commit into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use re_query_cache::{MaybeCachedComponentData, QueryError};
use re_types::{
archetypes::TimeSeriesScalar,
components::{Color, Radius, Scalar, ScalarScattering, Text},
Loggable,
Archetype, Loggable,
};
use re_viewer_context::{
AnnotationMap, DefaultColor, IdentifiedViewSystem, SpaceViewSystemExecutionError, ViewQuery,
Expand Down Expand Up @@ -30,7 +30,15 @@ impl IdentifiedViewSystem for LegacyTimeSeriesSystem {

impl VisualizerSystem for LegacyTimeSeriesSystem {
fn visualizer_query_info(&self) -> VisualizerQueryInfo {
VisualizerQueryInfo::from_archetype::<TimeSeriesScalar>()
let mut query_info = VisualizerQueryInfo::from_archetype::<TimeSeriesScalar>();
// Although we don't normally include indicator components in required components,
// we don't want to show this legacy visualizer unless a user is actively using
// the legacy archetype for their logging. Users just working with Scalar will
// only see the new visualizer options.
query_info
.required
.insert(TimeSeriesScalar::indicator().name());
query_info
}

fn execute(
Expand Down
2 changes: 1 addition & 1 deletion crates/re_space_view_time_series/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
//! A Space View that shows plots over Rerun timelines.

mod aggregation;
mod legacy_visualizer_system;
mod line_visualizer_system;
mod overrides;
mod point_visualizer_system;
mod space_view_class;
mod util;
mod visualizer_system;

use re_log_types::EntityPath;
use re_types::components::MarkerShape;
Expand Down
2 changes: 1 addition & 1 deletion crates/re_space_view_time_series/src/space_view_class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ use re_viewer_context::{
SpaceViewSystemExecutionError, SystemExecutionOutput, ViewQuery, ViewerContext,
};

use crate::legacy_visualizer_system::LegacyTimeSeriesSystem;
use crate::line_visualizer_system::SeriesLineSystem;
use crate::point_visualizer_system::SeriesPointSystem;
use crate::visualizer_system::LegacyTimeSeriesSystem;
use crate::PlotSeriesKind;

// ---
Expand Down
Loading