Skip to content

Commit 29eb895

Browse files
authored
Show arrow datatype when hovering a component (#10007)
Small usability improvement
1 parent c488f2e commit 29eb895

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6861,6 +6861,7 @@ dependencies = [
68616861
"egui_extras",
68626862
"egui_plot",
68636863
"itertools 0.14.0",
6864+
"re_arrow_util",
68646865
"re_byte_size",
68656866
"re_capabilities",
68666867
"re_chunk_store",

crates/store/re_sorbet/src/chunk_schema.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::ops::Deref;
1+
use std::ops::{Deref, DerefMut};
22

33
use arrow::datatypes::{Field as ArrowField, Schema as ArrowSchema};
44

@@ -42,6 +42,13 @@ impl Deref for ChunkSchema {
4242
}
4343
}
4444

45+
impl DerefMut for ChunkSchema {
46+
#[inline]
47+
fn deref_mut(&mut self) -> &mut Self::Target {
48+
&mut self.sorbet
49+
}
50+
}
51+
4552
/// ## Builders
4653
impl ChunkSchema {
4754
pub fn new(

crates/viewer/re_data_ui/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ workspace = true
1919
all-features = true
2020

2121
[dependencies]
22+
re_arrow_util.workspace = true
2223
re_byte_size.workspace = true
2324
re_capabilities = { workspace = true, features = ["egui"] }
2425
re_chunk_store.workspace = true

crates/viewer/re_data_ui/src/instance_path.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,12 @@ fn component_list_ui(
244244
component_descr
245245
.component_name
246246
.data_ui_recording(ctx, ui, UiLayout::Tooltip);
247+
if let Some(data) = unit.component_batch_raw(component_descr) {
248+
ui.list_item_flat_noninteractive(
249+
re_ui::list_item::PropertyContent::new("Data type")
250+
.value_text(re_arrow_util::format_data_type(data.data_type())),
251+
);
252+
}
247253
});
248254

249255
if interactive {

0 commit comments

Comments
 (0)