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

Can't select/click a 2D primitive without also selecting underlying image #6761

Closed
emilk opened this issue Jul 4, 2024 · 4 comments · Fixed by #8404
Closed

Can't select/click a 2D primitive without also selecting underlying image #6761

emilk opened this issue Jul 4, 2024 · 4 comments · Fixed by #8404
Assignees
Labels
😤 annoying Something in the UI / SDK is annoying to use 🪳 bug Something isn't working 🧑‍🎨 Design Requires UX/UI designer input 🏎️ Quick Issue Can be fixed in a few hours or less 🔺 re_renderer affects re_renderer itself ui concerns graphical user interface

Comments

@emilk
Copy link
Member

emilk commented Jul 4, 2024

When I hover a 2D primitive, like a box or a point, I expect only to hover that thing, not also all images under it.

image

Affects 2D spatial views, and maybe 3D ones too.

This is probably related to draw order and depth offsets.


The offending code is this:

// We never throw away any textured rects, even if they're behind other objects.
hits.extend(rect_hits);

There is no motivation for the behavior in the code, but the blame points to

Which was created to fix

@emilk emilk added 🪳 bug Something isn't working ui concerns graphical user interface 🔺 re_renderer affects re_renderer itself labels Jul 4, 2024
@nikolausWest
Copy link
Member

I don't actually agree with this expectation. If I run an object detector on an image, the edges of the bounding boxes are the most interesting parts of the image to inspect. If we only hover one thing at a time, it makes it super hard to look closely at around those borders. We used to have it that we only hovered one entity at a time but changed that because it made it really hard to debug for instance detections on images

@emilk
Copy link
Member Author

emilk commented Jul 4, 2024

I can understand it for hovering, but for clicking it becomes quite confusing, and will become even more confusing when we have solid primitives. Say you click the middle of a solid-filled rectangle. Then you see an image in the selection view. WTH!?

In either case, I suggest we don't close this until we explain in the code (and maybe in the UI) that this behavior is intentional.

@emilk emilk added the 😤 annoying Something in the UI / SDK is annoying to use label Jul 4, 2024
@nikolausWest
Copy link
Member

Fair enough. I think it would be pretty reasonable for clicking to just select the topmost thing but hovering going all the way through

@abey79
Copy link
Member

abey79 commented Dec 9, 2024

I suggest we bite the bullet and roll a heuristic-y approach here.

  1. For hover, don't change the current behaviour (aka everything that's under the mouse gets highlighted).

  2. For click/cmd-click:

  • if the picked items are all image-like, select them all
  • if the picked items are a mix of image-like and primitive-like (point, line, etc.), ignore the image-like ones and select only the primitive-like ones

@emilk emilk added the 🏎️ Quick Issue Can be fixed in a few hours or less label Dec 9, 2024
@emilk emilk assigned emilk and unassigned emilk Dec 10, 2024
@emilk emilk closed this as completed in 07b8825 Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😤 annoying Something in the UI / SDK is annoying to use 🪳 bug Something isn't working 🧑‍🎨 Design Requires UX/UI designer input 🏎️ Quick Issue Can be fixed in a few hours or less 🔺 re_renderer affects re_renderer itself ui concerns graphical user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants