-
Notifications
You must be signed in to change notification settings - Fork 405
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
Show preview of Image/DepthImage/SegmentationImage
when selected
#7147
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.
pretty! Debatable whether the property view preview is too large, but I like it (:
totally makes sense that these previews don't capture overrides given where they are shown, but this is probably something we'll have to address in the future 🤔
Ok(response) => response.on_hover_ui(|ui| { | ||
// Show larger image on hover. | ||
let hover_size = Vec2::splat(400.0); | ||
show_image_preview(render_ctx, ui, texture, &debug_name, hover_size).ok(); | ||
}), |
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.
Where would this path be active? Wasn't able to get there in the ui.
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.
indicator_count == components.len() | ||
if instance.is_all() { | ||
let component_map = components.into_iter().collect(); | ||
preview_if_image_ui(ctx, ui, ui_layout, query, entity_path, &component_map); |
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 wish there was a more scalable way for "pan entity ui" already. But this simple special handling will probably go a long way 🤷
@@ -59,106 +70,222 @@ impl DataUi for InstancePath { | |||
if indicator_count > 1 { "s" } else { "" } | |||
), | |||
); |
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.
since the return;
got removed here we're still evaluating the image preview if this is a single line. I don't know what this could break in the ui (haven't spotted anything) but this might be wrong? (could be that something down the line opts out, but I'm not seeing it in this diff at least)
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.
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 prefer this way of writing it to early returns anyway
}); | ||
} | ||
|
||
/// If this entity is an image, show it together with buttons to download and copy the image. |
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.
those download buttons aren't there yet
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.
Give me a couple of hours :)
What
When you select an entity that contains an
Image
,DepthImage
orSegmentationImage
, a preview of it will be show.Coming later: button to copy and save/download the image.
Toolip
Selection panel
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
.