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

Add an explicit DataResult variant to re_viewport_context::Item #5369

Merged
merged 2 commits into from
Mar 2, 2024

Conversation

abey79
Copy link
Member

@abey79 abey79 commented Mar 1, 2024

What

Basically this:

   pub enum Item {
       /* ... */
-      InstancePath(Option<SpaceViewId>, InstancePath),
+      InstancePath(InstancePath),
+      DataResult(SpaceViewId, InstancePath),
   }

The motivation is to make the distinction between an entity/instance from the data store distinct from an entity/instance in the context of a space view query's data result.

Note: I initially considered having an InstancePath instead of an EntityPath for Item::DataResult. However, after discussing with @Wumpf, we deemed that undesirable as we want to be able to select (or otherwise consider) single instances from data results.

This PR also fixes a very subtle usability fix whereby clicking on the shown button in the selection panel for a data store instance would lead to the corresponding space view data result entity (not instance!). This is fixed now.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

@abey79 abey79 added 🚜 refactor Change the code, not the functionality exclude from changelog PRs with this won't show up in CHANGELOG.md labels Mar 1, 2024
@Wumpf Wumpf self-requested a review March 1, 2024 16:25
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat

crates/re_viewer_context/src/selection_state.rs Outdated Show resolved Hide resolved
@abey79 abey79 merged commit 9f04b35 into main Mar 2, 2024
34 checks passed
@abey79 abey79 deleted the antoine/split-item-data-result branch March 2, 2024 08:01
abey79 added a commit that referenced this pull request Mar 2, 2024
abey79 added a commit that referenced this pull request Mar 2, 2024
### What

As the title says ☝🏻 

### 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/5373/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5373/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/5373/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/5373)
- [Docs
preview](https://rerun.io/preview/4ce11b992b0951da9170518b8c3f5af2f65b8275/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/4ce11b992b0951da9170518b8c3f5af2f65b8275/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude from changelog PRs with this won't show up in CHANGELOG.md 🚜 refactor Change the code, not the functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants