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

Trackig issue: drag-and-drop improvement #7108

Open
3 of 4 tasks
abey79 opened this issue Aug 8, 2024 · 1 comment
Open
3 of 4 tasks

Trackig issue: drag-and-drop improvement #7108

abey79 opened this issue Aug 8, 2024 · 1 comment
Labels
🎄 tracking issue issue that tracks a bunch of subissues ui concerns graphical user interface

Comments

@abey79
Copy link
Member

abey79 commented Aug 8, 2024

Dragging entities from/to the blueprint tree/streams tree/viewport

TL;DR: this is high value (but needs work)

Summary table

↓ to / from → Blueprint tree Streams tree Viewport
Blueprint tree: Existing container 🫳 🫳
Blueprint tree: Existing view 🫳 🫳
Viewport: Existing view #8266 (need design) #8266 (need design) 🫳 (too complex for value)
Viewport: New view (aka in between existing views) #8267 (need design, complex) #8267 (need design, complex) 🫳 (too complex for value)

❌: meaningless
🫳: postpone

Related issues

Dragging containers/views from/to the blueprint tree and viewport

TL;DR: we're basically good as is.

Summary table:

↓ to / from → Blueprint tree Viewport
Blueprint tree: Existing container 🫳
Blueprint tree: Existing view
Viewport: Existing container 🫳

✅: done
❌: meaningless
🫳: postpone

Other high priority items

@abey79 abey79 added ui concerns graphical user interface 🎄 tracking issue issue that tracks a bunch of subissues labels Aug 8, 2024
@teh-cmc
Copy link
Member

teh-cmc commented Aug 8, 2024

I would add this one to the list 😶 :

abey79 added a commit that referenced this issue Dec 11, 2024
…t tree (#8334)

### Related

* Closes #8276
* Closes #8275
* Part of #8266
* Part of #8267
* Related to #7108

### What

This PR makes it possible to drag multi-selection of views and
containers within the blueprint tree. It lays the foundation of a system
that will be extended to other drag payload and UI sections.

Specifically:
- `ctx.handle_select_hover_drag_interactions()` (formerly
`ctx.select_hovered_on_click()`) is now able to initiate drag
interactions. This is opt-in for now, as dragging from most place isn't
supported yet (to implemented in follow-up PRs).
- Introduce a new `DragAndDropPayload` type to interoperate between
various part of the UI. This type also enforce the grouping of items
that can meaningfully be dragged together (e.g. it's ok to drag a view
and a container together, because there exist somewhere they can be
dropped to, but it's not ok to drag a view and an entity together).
- When a drag is successfully initiated, a "pill" is displayed along the
cursor which indicates the content of what's being dragged.
- Introduces a _very_ hack mechanism for a black list of undraggable
items (aka the root container).
- Update blueprint tree to support multiple selection and the new drag
and drop payload type.
- Updates egui to latest `master`.

---------

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
🎄 tracking issue issue that tracks a bunch of subissues ui concerns graphical user interface
Projects
None yet
Development

No branches or pull requests

2 participants