Skip to content

Commit

Permalink
Handle enums differently to support #6625
Browse files Browse the repository at this point in the history
  • Loading branch information
tfoldi committed Jun 25, 2024
1 parent b5525b8 commit 1b5568f
Show file tree
Hide file tree
Showing 7 changed files with 592 additions and 1,178 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5214,7 +5214,7 @@ dependencies = [

[[package]]
name = "re_space_view_map"
version = "0.17.0-alpha.4"
version = "0.17.0-alpha.5"
dependencies = [
"egui",
"egui_plot",
Expand Down
108 changes: 54 additions & 54 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,60 +28,60 @@ version = "0.17.0-alpha.5"
# This is because we treat alpha-releases as incompatible, but semver doesn't.
# In particular: if we compile rerun 0.3.0-alpha.0 we only want it to use
# re_log_types 0.3.0-alpha.0, NOT 0.3.0-alpha.4 even though it is newer and semver-compatible.
re_analytics = { path = "crates/re_analytics", version = "=0.17.0-alpha.4", default-features = false }
re_blueprint_tree = { path = "crates/re_blueprint_tree", version = "=0.17.0-alpha.4", default-features = false }
re_build_info = { path = "crates/re_build_info", version = "=0.17.0-alpha.4", default-features = false }
re_build_tools = { path = "crates/re_build_tools", version = "=0.17.0-alpha.4", default-features = false }
re_case = { path = "crates/re_case", version = "=0.17.0-alpha.4", default-features = false }
re_chunk = { path = "crates/re_chunk", version = "=0.17.0-alpha.4", default-features = false }
re_context_menu = { path = "crates/re_context_menu", version = "=0.17.0-alpha.4", default-features = false }
re_crash_handler = { path = "crates/re_crash_handler", version = "=0.17.0-alpha.4", default-features = false }
re_data_loader = { path = "crates/re_data_loader", version = "=0.17.0-alpha.4", default-features = false }
re_data_source = { path = "crates/re_data_source", version = "=0.17.0-alpha.4", default-features = false }
re_data_store = { path = "crates/re_data_store", version = "=0.17.0-alpha.4", default-features = false }
re_data_ui = { path = "crates/re_data_ui", version = "=0.17.0-alpha.4", default-features = false }
re_dev_tools = { path = "crates/re_dev_tools", version = "=0.17.0-alpha.4", default-features = false }
re_edit_ui = { path = "crates/re_edit_ui", version = "=0.17.0-alpha.4", default-features = false }
re_entity_db = { path = "crates/re_entity_db", version = "=0.17.0-alpha.4", default-features = false }
re_error = { path = "crates/re_error", version = "=0.17.0-alpha.4", default-features = false }
re_format = { path = "crates/re_format", version = "=0.17.0-alpha.4", default-features = false }
re_format_arrow = { path = "crates/re_format_arrow", version = "=0.17.0-alpha.4", default-features = false }
re_int_histogram = { path = "crates/re_int_histogram", version = "=0.17.0-alpha.4", default-features = false }
re_log = { path = "crates/re_log", version = "=0.17.0-alpha.4", default-features = false }
re_log_encoding = { path = "crates/re_log_encoding", version = "=0.17.0-alpha.4", default-features = false }
re_log_types = { path = "crates/re_log_types", version = "=0.17.0-alpha.4", default-features = false }
re_memory = { path = "crates/re_memory", version = "=0.17.0-alpha.4", default-features = false }
re_query = { path = "crates/re_query", version = "=0.17.0-alpha.4", default-features = false }
re_renderer = { path = "crates/re_renderer", version = "=0.17.0-alpha.4", default-features = false }
re_sdk = { path = "crates/re_sdk", version = "=0.17.0-alpha.4", default-features = false }
re_sdk_comms = { path = "crates/re_sdk_comms", version = "=0.17.0-alpha.4", default-features = false }
re_selection_panel = { path = "crates/re_selection_panel", version = "=0.17.0-alpha.4", default-features = false }
re_smart_channel = { path = "crates/re_smart_channel", version = "=0.17.0-alpha.4", default-features = false }
re_space_view = { path = "crates/re_space_view", version = "=0.17.0-alpha.4", default-features = false }
re_space_view_bar_chart = { path = "crates/re_space_view_bar_chart", version = "=0.17.0-alpha.4", default-features = false }
re_space_view_dataframe = { path = "crates/re_space_view_dataframe", version = "=0.17.0-alpha.4", default-features = false }
re_space_view_map = { path = "crates/re_space_view_map", version = "=0.17.0-alpha.4", default-features = false }
re_space_view_spatial = { path = "crates/re_space_view_spatial", version = "=0.17.0-alpha.4", default-features = false }
re_space_view_tensor = { path = "crates/re_space_view_tensor", version = "=0.17.0-alpha.4", default-features = false }
re_space_view_text_document = { path = "crates/re_space_view_text_document", version = "=0.17.0-alpha.4", default-features = false }
re_space_view_text_log = { path = "crates/re_space_view_text_log", version = "=0.17.0-alpha.4", default-features = false }
re_space_view_time_series = { path = "crates/re_space_view_time_series", version = "=0.17.0-alpha.4", default-features = false }
re_string_interner = { path = "crates/re_string_interner", version = "=0.17.0-alpha.4", default-features = false }
re_time_panel = { path = "crates/re_time_panel", version = "=0.17.0-alpha.4", default-features = false }
re_tracing = { path = "crates/re_tracing", version = "=0.17.0-alpha.4", default-features = false }
re_tuid = { path = "crates/re_tuid", version = "=0.17.0-alpha.4", default-features = false }
re_types = { path = "crates/re_types", version = "=0.17.0-alpha.4", default-features = false }
re_types_blueprint = { path = "crates/re_types_blueprint", version = "=0.17.0-alpha.4", default-features = false }
re_types_builder = { path = "crates/re_types_builder", version = "=0.17.0-alpha.4", default-features = false }
re_types_core = { path = "crates/re_types_core", version = "=0.17.0-alpha.4", default-features = false }
re_ui = { path = "crates/re_ui", version = "=0.17.0-alpha.4", default-features = false }
re_viewer = { path = "crates/re_viewer", version = "=0.17.0-alpha.4", default-features = false }
re_viewer_context = { path = "crates/re_viewer_context", version = "=0.17.0-alpha.4", default-features = false }
re_viewport = { path = "crates/re_viewport", version = "=0.17.0-alpha.4", default-features = false }
re_viewport_blueprint = { path = "crates/re_viewport_blueprint", version = "=0.17.0-alpha.4", default-features = false }
re_web_viewer_server = { path = "crates/re_web_viewer_server", version = "=0.17.0-alpha.4", default-features = false }
re_ws_comms = { path = "crates/re_ws_comms", version = "=0.17.0-alpha.4", default-features = false }
rerun = { path = "crates/rerun", version = "=0.17.0-alpha.4", default-features = false }
re_analytics = { path = "crates/re_analytics", version = "=0.17.0-alpha.5", default-features = false }
re_blueprint_tree = { path = "crates/re_blueprint_tree", version = "=0.17.0-alpha.5", default-features = false }
re_build_info = { path = "crates/re_build_info", version = "=0.17.0-alpha.5", default-features = false }
re_build_tools = { path = "crates/re_build_tools", version = "=0.17.0-alpha.5", default-features = false }
re_case = { path = "crates/re_case", version = "=0.17.0-alpha.5", default-features = false }
re_chunk = { path = "crates/re_chunk", version = "=0.17.0-alpha.5", default-features = false }
re_context_menu = { path = "crates/re_context_menu", version = "=0.17.0-alpha.5", default-features = false }
re_crash_handler = { path = "crates/re_crash_handler", version = "=0.17.0-alpha.5", default-features = false }
re_data_loader = { path = "crates/re_data_loader", version = "=0.17.0-alpha.5", default-features = false }
re_data_source = { path = "crates/re_data_source", version = "=0.17.0-alpha.5", default-features = false }
re_data_store = { path = "crates/re_data_store", version = "=0.17.0-alpha.5", default-features = false }
re_data_ui = { path = "crates/re_data_ui", version = "=0.17.0-alpha.5", default-features = false }
re_dev_tools = { path = "crates/re_dev_tools", version = "=0.17.0-alpha.5", default-features = false }
re_edit_ui = { path = "crates/re_edit_ui", version = "=0.17.0-alpha.5", default-features = false }
re_entity_db = { path = "crates/re_entity_db", version = "=0.17.0-alpha.5", default-features = false }
re_error = { path = "crates/re_error", version = "=0.17.0-alpha.5", default-features = false }
re_format = { path = "crates/re_format", version = "=0.17.0-alpha.5", default-features = false }
re_format_arrow = { path = "crates/re_format_arrow", version = "=0.17.0-alpha.5", default-features = false }
re_int_histogram = { path = "crates/re_int_histogram", version = "=0.17.0-alpha.5", default-features = false }
re_log = { path = "crates/re_log", version = "=0.17.0-alpha.5", default-features = false }
re_log_encoding = { path = "crates/re_log_encoding", version = "=0.17.0-alpha.5", default-features = false }
re_log_types = { path = "crates/re_log_types", version = "=0.17.0-alpha.5", default-features = false }
re_memory = { path = "crates/re_memory", version = "=0.17.0-alpha.5", default-features = false }
re_query = { path = "crates/re_query", version = "=0.17.0-alpha.5", default-features = false }
re_renderer = { path = "crates/re_renderer", version = "=0.17.0-alpha.5", default-features = false }
re_sdk = { path = "crates/re_sdk", version = "=0.17.0-alpha.5", default-features = false }
re_sdk_comms = { path = "crates/re_sdk_comms", version = "=0.17.0-alpha.5", default-features = false }
re_selection_panel = { path = "crates/re_selection_panel", version = "=0.17.0-alpha.5", default-features = false }
re_smart_channel = { path = "crates/re_smart_channel", version = "=0.17.0-alpha.5", default-features = false }
re_space_view = { path = "crates/re_space_view", version = "=0.17.0-alpha.5", default-features = false }
re_space_view_bar_chart = { path = "crates/re_space_view_bar_chart", version = "=0.17.0-alpha.5", default-features = false }
re_space_view_dataframe = { path = "crates/re_space_view_dataframe", version = "=0.17.0-alpha.5", default-features = false }
re_space_view_map = { path = "crates/re_space_view_map", version = "=0.17.0-alpha.5", default-features = false }
re_space_view_spatial = { path = "crates/re_space_view_spatial", version = "=0.17.0-alpha.5", default-features = false }
re_space_view_tensor = { path = "crates/re_space_view_tensor", version = "=0.17.0-alpha.5", default-features = false }
re_space_view_text_document = { path = "crates/re_space_view_text_document", version = "=0.17.0-alpha.5", default-features = false }
re_space_view_text_log = { path = "crates/re_space_view_text_log", version = "=0.17.0-alpha.5", default-features = false }
re_space_view_time_series = { path = "crates/re_space_view_time_series", version = "=0.17.0-alpha.5", default-features = false }
re_string_interner = { path = "crates/re_string_interner", version = "=0.17.0-alpha.5", default-features = false }
re_time_panel = { path = "crates/re_time_panel", version = "=0.17.0-alpha.5", default-features = false }
re_tracing = { path = "crates/re_tracing", version = "=0.17.0-alpha.5", default-features = false }
re_tuid = { path = "crates/re_tuid", version = "=0.17.0-alpha.5", default-features = false }
re_types = { path = "crates/re_types", version = "=0.17.0-alpha.5", default-features = false }
re_types_blueprint = { path = "crates/re_types_blueprint", version = "=0.17.0-alpha.5", default-features = false }
re_types_builder = { path = "crates/re_types_builder", version = "=0.17.0-alpha.5", default-features = false }
re_types_core = { path = "crates/re_types_core", version = "=0.17.0-alpha.5", default-features = false }
re_ui = { path = "crates/re_ui", version = "=0.17.0-alpha.5", default-features = false }
re_viewer = { path = "crates/re_viewer", version = "=0.17.0-alpha.5", default-features = false }
re_viewer_context = { path = "crates/re_viewer_context", version = "=0.17.0-alpha.5", default-features = false }
re_viewport = { path = "crates/re_viewport", version = "=0.17.0-alpha.5", default-features = false }
re_viewport_blueprint = { path = "crates/re_viewport_blueprint", version = "=0.17.0-alpha.5", default-features = false }
re_web_viewer_server = { path = "crates/re_web_viewer_server", version = "=0.17.0-alpha.5", default-features = false }
re_ws_comms = { path = "crates/re_ws_comms", version = "=0.17.0-alpha.5", default-features = false }
rerun = { path = "crates/rerun", version = "=0.17.0-alpha.5", default-features = false }

# egui-crates:
ecolor = "0.27.2"
Expand Down
7 changes: 7 additions & 0 deletions crates/re_edit_ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,18 @@ pub fn register_editors(registry: &mut re_viewer_context::ComponentUiRegistry) {
registry.add_singleline_editor_ui::<Name>(edit_singleline_string);
registry.add_singleline_editor_ui::<Secret>(edit_singleline_secret_string);

registry.add_singleline_editor_ui::<DepthMeter>(edit_f32_zero_to_max_float_raw);
registry.add_singleline_editor_ui::<MarkerSize>(edit_f32_zero_to_max_float_raw);
registry.add_singleline_editor_ui::<Radius>(edit_f32_zero_to_max_float_raw);
registry.add_singleline_editor_ui::<StrokeWidth>(edit_f32_zero_to_max_float_raw);
registry.add_singleline_editor_ui::<ZoomLevel>(edit_f32_zero_to_max_float_raw);

registry.add_singleline_editor_ui(|_ctx, ui, value| edit_enum::<BackgroundKind>(ui, value));
registry.add_singleline_editor_ui(|_ctx, ui, value| edit_enum::<Colormap>(ui, value));
registry.add_singleline_editor_ui(|_ctx, ui, value| edit_enum::<Corner2D>(ui, value));
registry
.add_singleline_editor_ui(|_ctx, ui, value| edit_enum::<MagnificationFilter>(ui, value));
registry.add_singleline_editor_ui(|_ctx, ui, value| edit_enum::<MapProvider>(ui, value));
registry.add_singleline_editor_ui(|_ctx, ui, value| edit_enum::<AggregationPolicy>(ui, value));
registry.add_singleline_editor_ui(|_ctx, ui, value| edit_enum::<ViewFit>(ui, value));

Expand Down
28 changes: 2 additions & 26 deletions crates/re_types/src/blueprint/archetypes/map_options.rs

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

30 changes: 21 additions & 9 deletions crates/re_types/src/blueprint/components/map_provider.rs

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

40 changes: 40 additions & 0 deletions crates/re_viewer/src/reflection/mod.rs

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

Loading

0 comments on commit 1b5568f

Please sign in to comment.