-
Notifications
You must be signed in to change notification settings - Fork 373
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
Improve the Selection Panel UI for components when a single item is selected #4416
Conversation
…selection in the Selection Panel Also: - adjust `DataUi` impls accordingly - add a script to log very long `AnnotationContext` for UI test purposes TODO: - [ ] update annotation context UI to use collapsible header Fixes #4375
Cool! What happens if I have some data there with say 100k rows? |
If I comply with this 16-bit limit (=> 65k items), the UI becomes sluggish (115ms on my computer) whenever the collapsing header for the corresponding table is open. That's because the entire table is drawn at every frame. Not ideal, but this isn't actually a regression for this PR. There might be ways to optimise that though. sluggish_ui_65k_annotations.mp4Edit: #4426 |
} | ||
UiVerbosity::SelectionPanel => { | ||
// We're alone in the selection panel. Let the outer ScrollArea do the work. | ||
table.auto_shrink([false, true]).vscroll(false) |
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 suggest we only disable scrolling if the number of elements in the table is small enough, to avoid the performance problem in #4426
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.
As per discussion yesterday, let's try to address that at egui::Table
level. If that fail, I'll do another PR with hard-coded limits. I've tagged this issue with 0.12 so we dont forget:
# Conflicts: # crates/re_data_ui/src/annotation_context.rs
What
This PR:
DataUi
impls accordingly;AnnotationContext
to use collapsible headers instead of inner scroll areas (there can be many tables for one instance, so inner scroll bars are really annoying);AnnotationContext
for UI test purposes.ScrollArea
when two components are selected #4367Screenshot
New collapsible-header-based UI for annotation context:
annotation_context_selection_panel.mp4
Also fix this spurious separator (and the related sizing issue) at the top of the hover box:
Checklist