Skip to content

Commit 55a86c6

Browse files
committed
Show tables under local and use table icon
1 parent 5b05274 commit 55a86c6

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

crates/viewer/re_data_ui/src/item_ui.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -854,8 +854,7 @@ pub fn table_id_button_ui(
854854
) {
855855
let item = re_viewer_context::Item::TableId(table_id.clone());
856856

857-
let mut item_content =
858-
list_item::LabelContent::new(table_id.as_str()).with_icon(&icons::VIEW_DATAFRAME);
857+
let mut item_content = list_item::LabelContent::new(table_id.as_str()).with_icon(&icons::TABLE);
859858

860859
if ui_layout.is_selection_panel() {
861860
item_content = item_content.with_buttons(|ui| {

crates/viewer/re_viewer/src/ui/recordings_panel.rs

+5-12
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ fn recording_list_ui(
123123
);
124124
}
125125

126-
if !local_recordings.is_empty()
126+
if (!local_recordings.is_empty() || !ctx.storage_context.tables.is_empty())
127127
&& ui
128128
.list_item()
129129
.header()
130130
.show_hierarchical_with_children(
131131
ui,
132132
egui::Id::new("local items"),
133133
true,
134-
list_item::LabelContent::header("Local Recordings"),
134+
list_item::LabelContent::header("Local"),
135135
|ui| {
136136
for (app_id, entity_dbs) in local_recordings {
137137
dataset_and_its_recordings_ui(
@@ -141,6 +141,9 @@ fn recording_list_ui(
141141
entity_dbs,
142142
);
143143
}
144+
for table_id in ctx.storage_context.tables.keys() {
145+
table_id_button_ui(ctx, ui, table_id, UiLayout::SelectionPanel);
146+
}
144147
},
145148
)
146149
.item_response
@@ -152,16 +155,6 @@ fn recording_list_ui(
152155
)));
153156
}
154157

155-
let item = ui.list_item().header();
156-
let title = list_item::LabelContent::header("Tables");
157-
if !ctx.storage_context.tables.is_empty() {
158-
item.show_hierarchical_with_children(ui, egui::Id::new("tables"), true, title, |ui| {
159-
for table_id in ctx.storage_context.tables.keys() {
160-
table_id_button_ui(ctx, ui, table_id, UiLayout::SelectionPanel);
161-
}
162-
});
163-
};
164-
165158
// Always show welcome screen last, if at all:
166159
if (ctx
167160
.app_options()

0 commit comments

Comments
 (0)