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

Add support to expand rows to show instances in the dataframe view #7400

Merged
merged 25 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
327791b
First working prototype
abey79 Sep 11, 2024
d80ef25
Proper UI for collapsing/uncollapsing instances
abey79 Sep 11, 2024
008f8b6
Merge branch 'main' into antoine/dataframe-instance-expansion
abey79 Sep 11, 2024
b4b0d5c
Proper handling of "xx more…" instances
abey79 Sep 11, 2024
1fa7fb5
Fix animation + some code cleaning
abey79 Sep 12, 2024
69f394a
More cleaning and lint fix
abey79 Sep 12, 2024
d07cce2
Merge branch 'main' into antoine/dataframe-instance-expansion
abey79 Sep 12, 2024
ec8efd4
Make the collapse/expand button the same color as inactive text
abey79 Sep 12, 2024
6d46025
US spelling
abey79 Sep 12, 2024
f63728f
Rewrite of the sub-cell logic, reads like a child book now
abey79 Sep 12, 2024
4b13469
Extract part of cell_ui into cell_ui_impl
abey79 Sep 12, 2024
45ddb3f
Further method extraction to fight against right drift
abey79 Sep 12, 2024
c197bab
Minor cleaning
abey79 Sep 12, 2024
b5c8c98
Merge branch 'main' into antoine/dataframe-instance-expansion
abey79 Sep 12, 2024
ee80456
Tiny cleanup
abey79 Sep 12, 2024
f5786b8
Improve salting, which fixes the refresh bug
abey79 Sep 12, 2024
91d19a6
Much improved, simplified, and documented the row expansion cache inv…
abey79 Sep 12, 2024
07c6bf3
Merge branch 'main' into antoine/dataframe-instance-expansion
abey79 Sep 12, 2024
500939a
Replace the test script with a (simpler) zoo specimen
abey79 Sep 12, 2024
49fef4f
Only iterate on visible instances based on clip rect (shaved multiple…
abey79 Sep 12, 2024
3abee41
Merge branch 'main' into antoine/dataframe-instance-expansion
abey79 Sep 17, 2024
1d76790
Review comments
abey79 Sep 17, 2024
51716df
Some more renaming
abey79 Sep 17, 2024
89313e5
Updated egui commit to last version (which removed the panic)
abey79 Sep 17, 2024
1f25fb6
Merge branch 'main' into antoine/dataframe-instance-expansion
abey79 Sep 17, 2024
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
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ armour = "armor"
artefact = "artifact"
authorise = "authorize"
behaviour = "behavior"
behavioural = "behavioral"
British = "American"
calibre = "caliber"
# allow 'cancelled' since Arrow uses it.
Expand Down
21 changes: 11 additions & 10 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@ checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30"
[[package]]
name = "ecolor"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
source = "git+https://github.com/emilk/egui.git?rev=1191d9fa86bcb33b57b264b0105f986005f6a6c6#1191d9fa86bcb33b57b264b0105f986005f6a6c6"
dependencies = [
"bytemuck",
"emath",
Expand All @@ -1787,7 +1787,7 @@ dependencies = [
[[package]]
name = "eframe"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
source = "git+https://github.com/emilk/egui.git?rev=1191d9fa86bcb33b57b264b0105f986005f6a6c6#1191d9fa86bcb33b57b264b0105f986005f6a6c6"
dependencies = [
"ahash",
"bytemuck",
Expand Down Expand Up @@ -1824,7 +1824,7 @@ dependencies = [
[[package]]
name = "egui"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
source = "git+https://github.com/emilk/egui.git?rev=1191d9fa86bcb33b57b264b0105f986005f6a6c6#1191d9fa86bcb33b57b264b0105f986005f6a6c6"
dependencies = [
"accesskit",
"ahash",
Expand All @@ -1841,7 +1841,7 @@ dependencies = [
[[package]]
name = "egui-wgpu"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
source = "git+https://github.com/emilk/egui.git?rev=1191d9fa86bcb33b57b264b0105f986005f6a6c6#1191d9fa86bcb33b57b264b0105f986005f6a6c6"
dependencies = [
"ahash",
"bytemuck",
Expand All @@ -1860,7 +1860,7 @@ dependencies = [
[[package]]
name = "egui-winit"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
source = "git+https://github.com/emilk/egui.git?rev=1191d9fa86bcb33b57b264b0105f986005f6a6c6#1191d9fa86bcb33b57b264b0105f986005f6a6c6"
dependencies = [
"accesskit_winit",
"ahash",
Expand Down Expand Up @@ -1900,7 +1900,7 @@ dependencies = [
[[package]]
name = "egui_extras"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
source = "git+https://github.com/emilk/egui.git?rev=1191d9fa86bcb33b57b264b0105f986005f6a6c6#1191d9fa86bcb33b57b264b0105f986005f6a6c6"
dependencies = [
"ahash",
"egui",
Expand All @@ -1916,7 +1916,7 @@ dependencies = [
[[package]]
name = "egui_glow"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
source = "git+https://github.com/emilk/egui.git?rev=1191d9fa86bcb33b57b264b0105f986005f6a6c6#1191d9fa86bcb33b57b264b0105f986005f6a6c6"
dependencies = [
"ahash",
"bytemuck",
Expand Down Expand Up @@ -1989,7 +1989,7 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]]
name = "emath"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
source = "git+https://github.com/emilk/egui.git?rev=1191d9fa86bcb33b57b264b0105f986005f6a6c6#1191d9fa86bcb33b57b264b0105f986005f6a6c6"
dependencies = [
"bytemuck",
"serde",
Expand Down Expand Up @@ -2090,7 +2090,7 @@ dependencies = [
[[package]]
name = "epaint"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
source = "git+https://github.com/emilk/egui.git?rev=1191d9fa86bcb33b57b264b0105f986005f6a6c6#1191d9fa86bcb33b57b264b0105f986005f6a6c6"
dependencies = [
"ab_glyph",
"ahash",
Expand All @@ -2109,7 +2109,7 @@ dependencies = [
[[package]]
name = "epaint_default_fonts"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
source = "git+https://github.com/emilk/egui.git?rev=1191d9fa86bcb33b57b264b0105f986005f6a6c6#1191d9fa86bcb33b57b264b0105f986005f6a6c6"

[[package]]
name = "equivalent"
Expand Down Expand Up @@ -5478,6 +5478,7 @@ dependencies = [
"re_data_ui",
"re_dataframe",
"re_entity_db",
"re_format",
"re_log",
"re_log_types",
"re_renderer",
Expand Down
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -514,12 +514,12 @@ missing_errors_doc = "allow"
# As a last resport, patch with a commit to our own repository.
# ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk.

ecolor = { git = "https://github.com/emilk/egui.git", rev = "66076101e12eee01dec374285521b0bed4ecc40a" } # egui master 2024-09-06
eframe = { git = "https://github.com/emilk/egui.git", rev = "66076101e12eee01dec374285521b0bed4ecc40a" } # egui master 2024-09-06
egui = { git = "https://github.com/emilk/egui.git", rev = "66076101e12eee01dec374285521b0bed4ecc40a" } # egui master 2024-09-06
egui_extras = { git = "https://github.com/emilk/egui.git", rev = "66076101e12eee01dec374285521b0bed4ecc40a" } # egui master 2024-09-06
egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "66076101e12eee01dec374285521b0bed4ecc40a" } # egui master 2024-09-06
emath = { git = "https://github.com/emilk/egui.git", rev = "66076101e12eee01dec374285521b0bed4ecc40a" } # egui master 2024-09-06
ecolor = { git = "https://github.com/emilk/egui.git", rev = "1191d9fa86bcb33b57b264b0105f986005f6a6c6" } # egui master 2024-09-17
eframe = { git = "https://github.com/emilk/egui.git", rev = "1191d9fa86bcb33b57b264b0105f986005f6a6c6" } # egui master 2024-09-17
egui = { git = "https://github.com/emilk/egui.git", rev = "1191d9fa86bcb33b57b264b0105f986005f6a6c6" } # egui master 2024-09-17
egui_extras = { git = "https://github.com/emilk/egui.git", rev = "1191d9fa86bcb33b57b264b0105f986005f6a6c6" } # egui master 2024-09-17
egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "1191d9fa86bcb33b57b264b0105f986005f6a6c6" } # egui master 2024-09-17
emath = { git = "https://github.com/emilk/egui.git", rev = "1191d9fa86bcb33b57b264b0105f986005f6a6c6" } # egui master 2024-09-17

# Useful while developing:
# ecolor = { path = "../../egui/crates/ecolor" }
Expand Down
4 changes: 2 additions & 2 deletions crates/viewer/re_component_ui/src/datatype_uis/float_drag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub fn edit_f32_float_raw_impl(
let speed = (value.abs() * 0.01).at_least(0.001);
ui.add(
egui::DragValue::new(value)
.clamp_to_range(false)
.clamp_existing_to_range(false)
.range(range)
.speed(speed),
)
Expand All @@ -67,7 +67,7 @@ fn edit_f32_zero_to_one_raw(ui: &mut egui::Ui, value: &mut MaybeMutRef<'_, f32>)
if let Some(value) = value.as_mut() {
ui.add(
egui::DragValue::new(value)
.clamp_to_range(false)
.clamp_existing_to_range(false)
.range(0.0..=1.0)
.speed(0.005)
.fixed_decimals(2),
Expand Down
4 changes: 2 additions & 2 deletions crates/viewer/re_component_ui/src/range1d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ pub fn edit_range1d(

let response_min = ui.add(
egui::DragValue::new(min)
.clamp_to_range(false)
.clamp_existing_to_range(false)
.range(f64::NEG_INFINITY..=*max)
.speed(speed),
);
ui.label("-");
let response_max = ui.add(
egui::DragValue::new(max)
.clamp_to_range(false)
.clamp_existing_to_range(false)
.range(*min..=f64::INFINITY)
.speed(speed),
);
Expand Down
8 changes: 4 additions & 4 deletions crates/viewer/re_component_ui/src/visual_bounds2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn range_mut_ui(ui: &mut egui::Ui, [start, end]: &mut [f64; 2]) -> egui::Respons
ui.horizontal_centered(|ui| {
let response_min = ui.add(
egui::DragValue::new(start)
.clamp_to_range(false)
.clamp_existing_to_range(false)
.range(f64::MIN..=*end)
.max_decimals(2)
.speed(speed),
Expand All @@ -66,7 +66,7 @@ fn range_mut_ui(ui: &mut egui::Ui, [start, end]: &mut [f64; 2]) -> egui::Respons

let response_max = ui.add(
egui::DragValue::new(end)
.clamp_to_range(false)
.clamp_existing_to_range(false)
.range(*start..=f64::MAX)
.max_decimals(2)
.speed(speed),
Expand Down Expand Up @@ -94,15 +94,15 @@ pub fn singleline_edit_visual_bounds2d(

let response_width = ui.add(
egui::DragValue::new(&mut width_edit)
.clamp_to_range(false)
.clamp_existing_to_range(false)
.range(0.001..=f64::MAX)
.max_decimals(1)
.speed(speed_func(width)),
);
ui.label("×");
let response_height = ui.add(
egui::DragValue::new(&mut height_edit)
.clamp_to_range(false)
.clamp_existing_to_range(false)
.range(0.001..=f64::MAX)
.max_decimals(1)
.speed(speed_func(height)),
Expand Down
1 change: 1 addition & 0 deletions crates/viewer/re_space_view_dataframe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ re_chunk_store.workspace = true
re_data_ui.workspace = true
re_dataframe.workspace = true
re_entity_db.workspace = true
re_format.workspace = true
re_log.workspace = true
re_log_types.workspace = true
re_renderer.workspace = true
Expand Down
Loading
Loading