-
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
Selecting/hovering components now highlights their parent entity #4748
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.
Yep, behaves nicely 👍
pub overall: InteractionHighlight, | ||
pub instances: ahash::HashMap<InstanceKey, InteractionHighlight>, | ||
overall: InteractionHighlight, | ||
instances: ahash::HashMap<InstanceKey, InteractionHighlight>, |
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.
Not added in this PR but surely an InstanceKey
should be NoHash
and therefore usable with a IntMap
, right? 🤔
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.
thought you're right at first but actually InstanceKey
is not NoHash
and it makes sense: Instance keys are usually ordered and low entropy, they are terrible hashes as is which is why we want to apply a hash function to them
Size changes
|
What
Note that this is implemented internally using what we call a "sibling selection" - we preserve the information that the entity itself within any space view isn't selected directly but only indirectly. Different ui elements can react different to sibling selections versus "real" selections - e.g. the blueprint view does not react to sibling selections. We do however show the full outline in the space view.
Took the opportunity to make the space view highlights determination code a bit more readable. Tested it a bit to make sure that the behavior is still the same.
Note the highlight of the points in the space view - this didn't happen before.
Similar, hovering highlights are even more generous now, making all entities hover-highlighted whenever an entity component path with the same entity is hovered (subltey: the 0/1/2 on the selection panel in the picture are *not* hover highlighted since they are specific instance paths)
Checklist
main
build: app.rerun.ionightly
build: app.rerun.io