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

Interactive layout items in blueprint tree view #2652

Closed
Tracked by #2695
emilk opened this issue Jul 10, 2023 · 0 comments · Fixed by #4910
Closed
Tracked by #2695

Interactive layout items in blueprint tree view #2652

emilk opened this issue Jul 10, 2023 · 0 comments · Fixed by #4910
Labels
ui concerns graphical user interface
Milestone

Comments

@emilk
Copy link
Member

emilk commented Jul 10, 2023

We show the layout (Horizontal, Vertical, Grid, Tabs) in the blueprint tree view, yet we cannot interact. We want to:

  • Select them and change them in the Selection View
  • Drag-and-drop items
@emilk emilk added the ui concerns graphical user interface label Jul 10, 2023
@abey79 abey79 changed the title Interactive layout items i blueprint tree view Interactive layout items in blueprint tree view Aug 7, 2023
@emilk emilk added this to the Triage milestone Nov 6, 2023
abey79 added a commit that referenced this issue Jan 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
### What

This PR implements a couple of single-selection drag-and-drop demo with
`ListItem`s in `re_ui_example`. One is flat, the other is hierarchical.
Most of it happens in `re_ui_example`, with some minimal support for
draggability in `ListItem`. The goal is to identify proper patterns (and
egui TODOs) for drag-and-drop support in the blueprint tree UI.

TODO:
- [x] iron out some bug where items disappear
- [x] highlight destination container
- [x] ascii art documentation for the drag areas
- [x] apply any change from:
    - emilk/egui#3859
    - emilk/egui#3860


https://github.com/rerun-io/rerun/assets/49431240/54588326-7e69-4d38-b16d-da17fc88b6b7

Contributes towards:
- #2652 

### 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/4879/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/4879/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/4879/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

- [PR Build Summary](https://build.rerun.io/pr/4879)
- [Docs
preview](https://rerun.io/preview/94b9a81e7d5b2934b44919453ce2c92257b46a73/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/94b9a81e7d5b2934b44919453ce2c92257b46a73/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
abey79 added a commit that referenced this issue Jan 30, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
### What

This PR adds support for drag-and-drop in the blueprint tree.

- Fixes #2652


https://github.com/rerun-io/rerun/assets/49431240/4d5f47ae-6d79-4ad0-a05d-b7eaaac18659


It has the following known limitations/future work:
- Only a single item may be dragged at a time. If multiple items are
selected when a drag starts, the selection is set to contain only the
dragged item.
  - #4887
- Only space view and containers may be dragged. The drag and drop
operations only operate on the view hierarchy (not the space view data).
- The root container has a special behaviour: it cannot be successfully
dragged, and nothing can be dragged before/after it. This is consistent
with it being the root container, but inconsistent with how the UI is
presented.
  - #4909
- Because of how Grid container work (they support "holes", and tend to
swap instead of reflow items when reordering), some drag operation have
additional order side effects within the destination (grid) container.
- #4916

### 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/4910/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/4910/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/4910/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

- [PR Build Summary](https://build.rerun.io/pr/4910)
- [Docs
preview](https://rerun.io/preview/b4084fe32cd0466fe6acd4807a33545091c9e1ba/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/b4084fe32cd0466fe6acd4807a33545091c9e1ba/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui concerns graphical user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant