From 25df77e164bf870a5c625c6719f8c9e9497122fe Mon Sep 17 00:00:00 2001 From: Antoine Beyeler <49431240+abey79@users.noreply.github.com> Date: Thu, 10 Oct 2024 11:20:34 +0200 Subject: [PATCH] Remove the feature flag for plot query clamping (#7664) ### What It has been defaulting to active for a few release without issues. DNM: depends on #7663 ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7664?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7664?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [x] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide - [PR Build Summary](https://build.rerun.io/pr/7664) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`. --- .../src/line_visualizer_system.rs | 9 ++------- .../src/point_visualizer_system.rs | 9 ++------- .../viewer/re_space_view_time_series/src/util.rs | 3 +-- crates/viewer/re_viewer/src/ui/rerun_menu.rs | 14 +++++++------- crates/viewer/re_viewer_context/src/app_options.rs | 5 ----- 5 files changed, 12 insertions(+), 28 deletions(-) diff --git a/crates/viewer/re_space_view_time_series/src/line_visualizer_system.rs b/crates/viewer/re_space_view_time_series/src/line_visualizer_system.rs index 45aeaa3ab2ec..6390262c62ec 100644 --- a/crates/viewer/re_space_view_time_series/src/line_visualizer_system.rs +++ b/crates/viewer/re_space_view_time_series/src/line_visualizer_system.rs @@ -188,13 +188,8 @@ impl SeriesLineSystem { .view_state .downcast_ref::() .map_or(0, |state| state.time_offset); - let time_range = determine_time_range( - view_query.latest_at, - time_offset, - data_result, - plot_mem, - ctx.viewer_ctx.app_options.plot_query_clamping, - ); + let time_range = + determine_time_range(view_query.latest_at, time_offset, data_result, plot_mem); { use re_space_view::RangeResultsExt as _; diff --git a/crates/viewer/re_space_view_time_series/src/point_visualizer_system.rs b/crates/viewer/re_space_view_time_series/src/point_visualizer_system.rs index 5947ba20d2f1..dbd25377c4c7 100644 --- a/crates/viewer/re_space_view_time_series/src/point_visualizer_system.rs +++ b/crates/viewer/re_space_view_time_series/src/point_visualizer_system.rs @@ -202,13 +202,8 @@ impl SeriesPointSystem { .view_state .downcast_ref::() .map_or(0, |state| state.time_offset); - let time_range = determine_time_range( - view_query.latest_at, - time_offset, - data_result, - plot_mem, - ctx.viewer_ctx.app_options.plot_query_clamping, - ); + let time_range = + determine_time_range(view_query.latest_at, time_offset, data_result, plot_mem); { use re_space_view::RangeResultsExt as _; diff --git a/crates/viewer/re_space_view_time_series/src/util.rs b/crates/viewer/re_space_view_time_series/src/util.rs index 456c2a9863e3..f268f1aaa722 100644 --- a/crates/viewer/re_space_view_time_series/src/util.rs +++ b/crates/viewer/re_space_view_time_series/src/util.rs @@ -32,7 +32,6 @@ pub fn determine_time_range( time_offset: i64, data_result: &re_viewer_context::DataResult, plot_mem: Option<&egui_plot::PlotMemory>, - enable_query_clamping: bool, ) -> ResolvedTimeRange { let query_range = data_result.query_range(); @@ -68,7 +67,7 @@ pub fn determine_time_range( // If we're not in auto mode, which is the mode where the query drives the bounds of the plot, // then we want the bounds of the plots to drive the query! - if !is_auto_bounds && enable_query_clamping { + if !is_auto_bounds { if let Some((x_min, x_max)) = plot_bounds { time_range.set_min(i64::max(time_range.min().as_i64(), x_min)); time_range.set_max(i64::min(time_range.max().as_i64(), x_max)); diff --git a/crates/viewer/re_viewer/src/ui/rerun_menu.rs b/crates/viewer/re_viewer/src/ui/rerun_menu.rs index 666e15024566..5d75274b4a49 100644 --- a/crates/viewer/re_viewer/src/ui/rerun_menu.rs +++ b/crates/viewer/re_viewer/src/ui/rerun_menu.rs @@ -352,6 +352,9 @@ fn options_menu_ui( }); } + // Currently, the wasm target does not have any experimental features. Remove this conditional + // compilation directive if/when this changes. + #[cfg(not(target_arch = "wasm32"))] { ui.add_space(SPACING); ui.label("Experimental features:"); @@ -376,17 +379,14 @@ fn options_menu_ui( } } +// IMPORTANT: if/when adding wasm-compatible experimental features, move this conditional +// compilation directive to `space_view_screenshot` and remove the one above the call size of this +// function!! +#[cfg(not(target_arch = "wasm32"))] fn experimental_feature_ui(ui: &mut egui::Ui, app_options: &mut re_viewer_context::AppOptions) { - #[cfg(not(target_arch = "wasm32"))] ui .re_checkbox(&mut app_options.experimental_space_view_screenshots, "Space view screenshots") .on_hover_text("Allow taking screenshots of 2D and 3D space views via their context menu. Does not contain labels."); - - ui.re_checkbox( - &mut app_options.plot_query_clamping, - "Plots: query clamping", - ) - .on_hover_text("Toggle query clamping for the plot visualizers. This is enabled by default and is only made toggable to facilitate potential bug hunts and performance comparisons."); } #[cfg(debug_assertions)] diff --git a/crates/viewer/re_viewer_context/src/app_options.rs b/crates/viewer/re_viewer_context/src/app_options.rs index 1d14cd3e6b25..0c7cd154edbc 100644 --- a/crates/viewer/re_viewer_context/src/app_options.rs +++ b/crates/viewer/re_viewer_context/src/app_options.rs @@ -17,9 +17,6 @@ pub struct AppOptions { #[cfg(not(target_arch = "wasm32"))] pub experimental_space_view_screenshots: bool, - /// Toggle query clamping for the plot visualizers. - pub plot_query_clamping: bool, - /// Displays an overlay for debugging picking. pub show_picking_debug_overlay: bool, @@ -50,8 +47,6 @@ impl Default for AppOptions { #[cfg(not(target_arch = "wasm32"))] experimental_space_view_screenshots: false, - plot_query_clamping: true, - show_picking_debug_overlay: false, inspect_blueprint_timeline: false,