-
Notifications
You must be signed in to change notification settings - Fork 366
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
Better origin heuristics for "Add entities to new space view" #5423
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.
nice, this worked out even better than I thought!
|
||
// Find the first ViewCoordinates3d logged, walking up from the common ancestor to the | ||
// subspace origin. | ||
EntityPath::incremental_walk(subspace_origin.as_ref(), &common_ancestor) |
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.
oh cool I didn't know this utility, this makes this relatively complicated operation here quite readable <3
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.
nor did I but I was certainly happy to find it :)
…5565) ### What Fix a bug introduced in #5411 and #5423 where the wrong origin would be suggested when creating a 3D space view from an entity part of a 2D space view. Quoting the original PR: > For 3D space views: the origin of the subspace that contains the selected entities common ancestor, _or_, if that one is rooted on a pinhole, the origin of the parent sub-space. Further, if a `ViewCoordinate` is logged in between the subspace origin and the common ancestor, then it's used as suggested origin. In most case, that means `/`, unless a `DisconnectedSpace` is encountered. The part of that logic where we check for a `ViewCoordinate` in the parent subspace was implemented incorrectly, which resulted in `check_context_menu_suggested_origin` to fail. With this PR, this test now passes. ### 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 newly built examples: [app.rerun.io](https://app.rerun.io/pr/5565/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/5565/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [app.rerun.io](https://app.rerun.io/pr/5565/index.html?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)! - [PR Build Summary](https://build.rerun.io/pr/5565) - [Docs preview](https://rerun.io/preview/268125aaddc63e0524743528cf3b34c9ea0640e3/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/268125aaddc63e0524743528cf3b34c9ea0640e3/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
What
Follow up to #5411. This PR provides a better heuristics for the the default space origin with 2D and 3D space view. See the original PR for the (updated) design decision section.
Checklist
main
build: app.rerun.ionightly
build: app.rerun.io