-
Notifications
You must be signed in to change notification settings - Fork 370
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't had time for a proper review yet; just a quick look
For some reason, the view stop drawing while the time panel is playing 🤔 edit: fixed by f5786b8 Export-1726153168328.mp4 |
edit: fixed in This PR triggers a panic in egui via egui_table. Repro:
backtrace:
cc @emilk |
… tens of ms frame time)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should introduce a second word for these "sub-rows", like "line". As in: "Most table rows consist of a single line, but rows can sometimes be expanded to cover multiple lines"
|
||
/// Storage for [`ExpandedRows`], which should be persisted across frames. | ||
#[derive(Debug, Clone)] | ||
pub(crate) struct ExpandedRowsCache { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there one of these per view, or what?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. They are stored in the view state. (Alternatively could use egui memory with view id as key, but the view state works well and doesn't require id shenanigans.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Added a clarifying comment)
@@ -289,7 +289,7 @@ impl DesignTokens { | |||
} | |||
|
|||
pub fn table_line_height() -> f32 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably note that this excludes margins
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't, though. We don't have any explicit vertical margin, we just center stuff within the line space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should introduce a second word for these "sub-rows", like "line". As in: "Most table rows consist of a single line, but rows can sometimes be expanded to cover multiple lines"
# Conflicts: # Cargo.lock # crates/viewer/re_space_view_dataframe/Cargo.toml # crates/viewer/re_space_view_dataframe/src/space_view_class.rs
### What This PR adds zebra stripes to all dataframe view lines. Before, when a row was extend to show instances (#7400), those additional lines weren't striped. Also, the alternating colour is now a bit more visible. <img width="1789" alt="image" src="https://github.com/user-attachments/assets/95da89a8-d132-4b10-97fd-4f2ce20f40bc"> ### 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/7434?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/7434?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/7434) - [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`.
What
Index
column for instances and support un/collapsing #7066This PR introduces the ability to expend dataframe view rows to inspect individual instances.
Note: expanding instance can potentially lead to very loooong tables. This doesn't affect performance as we only query/draw what is visible on screen, it means we reaching the limits of egui's
f32
numerical precision. This can lead to uneven scrolling or even visual glitches if the number of instance is >>1M.Follow-up todo:
row_expand.mp4
Checklist
main
build: rerun.io/viewernightly
build: rerun.io/viewerCHANGELOG.md
and the migration guideTo run all checks from
main
, comment on the PR with@rerun-bot full-check
.