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

Blueprint tree always starts at the origin now, "projected" paths are called out explicitly #5342

Merged
merged 7 commits into from Feb 29, 2024

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Feb 28, 2024

What

tree.projections.mp4

Follows the design proposal from the ticket directly. Some detail decisions on how things are exactly handled, but code should be a bit more composable now (albeit admittedly still a bit messy)

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!

@Wumpf Wumpf added ui concerns graphical user interface 📺 re_viewer affects re_viewer itself 🟦 blueprint The data that defines our UI include in changelog labels Feb 28, 2024
@Wumpf Wumpf force-pushed the andreas/origin-focused-tree branch from 57f527e to 41822cf Compare February 28, 2024 18:19
Base automatically changed from andreas/remove-groups to main February 29, 2024 10:15
@Wumpf Wumpf force-pushed the andreas/origin-focused-tree branch from 41822cf to e1ffe80 Compare February 29, 2024 10:16
Copy link
Contributor

@abey79 abey79 left a comment

Choose a reason for hiding this comment

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

I really like the general direction where this is going! I gave it a try and generally worked as expected. I don't have a firm grasp on every single diff in the query code, but, appart from the few suprises I commented, this lgtm 👍

crates/re_data_ui/src/item_ui.rs Outdated Show resolved Hide resolved
crates/re_viewport/src/space_view_entity_picker.rs Outdated Show resolved Hide resolved
Comment on lines +25 to +29
enum DataResultNodeOrPath<'a> {
Path(&'a EntityPath),
DataResultNode(&'a DataResultNode),
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Multiple feelings here, including:

  • This "thing that loosely relates—or is—an entity" might have wider usefulness than just here. Top of my head: context menu implementation. (The precedent here is Contents, which isn't were it should either IMO)
  • This could be more related to re_viewer_context::Item too, as both of these enum branches should be included in Item

This probably is out of scope for this PR, but maybe worth adding a todo with assorted issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was quite unhappy that I had to introduce this thing. It's practically only relevent for the rare cases where the origin entity doesn't show up in the data result tree.
I could have adjusted the data result tree but I felt strongly about this ui requirement not changing the data model so that's where I ended up :/. Also, like you, I suspect that this could be useful for more things - maybe there's more entities that we want to show there there may or may not be a data result node

// while still being able to pass &ViewerContext down the chain.
let query_result = ctx.lookup_query_result(space_view.query_id()).clone();

let query_result = ctx.lookup_query_result(space_view.query_id());
Copy link
Contributor

Choose a reason for hiding this comment

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

These diffs always feel so nice :)

@Wumpf Wumpf added the do-not-merge Do not merge this PR label Feb 29, 2024
@Wumpf
Copy link
Member Author

Wumpf commented Feb 29, 2024

@abey79 looks like you spotted some severe weirdness in here, thanks! Need to definitely check on these before merging

@Wumpf Wumpf removed the do-not-merge Do not merge this PR label Feb 29, 2024
Copy link
Contributor

@abey79 abey79 left a comment

Choose a reason for hiding this comment

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

Funny these typos didn't actually break more things :)

@Wumpf Wumpf merged commit c413bd5 into main Feb 29, 2024
33 of 35 checks passed
@Wumpf Wumpf deleted the andreas/origin-focused-tree branch February 29, 2024 16:06
abey79 added a commit that referenced this pull request Mar 2, 2024
…5371)

### What

Follow-up to:
- #5342

After #5342, it was possible for a data result subtree to be displayed
twice in the blueprint tree UI, for example:

<img width="778" alt="image"
src="https://github.com/rerun-io/rerun/assets/49431240/13da8014-5abf-4206-bba8-d9d5a33d3919">

<br/>

This is a problem for storing collapsed state (#5362) and is generally a
weird UX.

This PR replaces the origin subtree by a link which, when clicked,
selects the actual origin subtree (which is always displayed above the
projections).


https://github.com/rerun-io/rerun/assets/49431240/6655a187-c786-4d30-8451-e473267e4526


### 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/5371/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5371/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/5371/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/5371)
- [Docs
preview](https://rerun.io/preview/8f4012dfde1a2d023ed2493bb7009fd342989b53/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/8f4012dfde1a2d023ed2493bb7009fd342989b53/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
@emilk emilk changed the title Blueprint tree always starts at the origin now, "projected" paths are called out explicitely Blueprint tree always starts at the origin now, "projected" paths are called out explicitly Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🟦 blueprint The data that defines our UI include in changelog 📺 re_viewer affects re_viewer itself ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update DataResultTree to start at origin and introduce "projected" subspace
2 participants