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

The Tree/Explorer should not prevent dragging representations #2766

Closed
pcdavid opened this issue Dec 8, 2023 · 0 comments · Fixed by #2769
Closed

The Tree/Explorer should not prevent dragging representations #2766

pcdavid opened this issue Dec 8, 2023 · 0 comments · Fixed by #2769

Comments

@pcdavid
Copy link
Member

pcdavid commented Dec 8, 2023

In TreeItem we do:

const draggable = kind.startsWith('siriusComponents://semantic') && item.selectable;
const dragStart: React.DragEventHandler<HTMLDivElement> = (event) => {
const entries = selection.entries.filter((entry) => entry.kind.startsWith('siriusComponents://semantic'));

which prevents dragging any tree item which represents something else than a semantic element.
In particular, this prevents dragging representations, which is something we want for e.g. #2765.

The tree representation should no try and impose any restriction on what can be dragged. It's up to each drop target to decide if it supports a particular kind of item.

@pcdavid pcdavid added this to the 2024.1.0 milestone Dec 8, 2023
@pcdavid pcdavid self-assigned this Dec 8, 2023
pcdavid added a commit that referenced this issue Dec 8, 2023
Bug: #2766
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
@pcdavid pcdavid linked a pull request Dec 8, 2023 that will close this issue
sbegaudeau pushed a commit that referenced this issue Dec 12, 2023
Bug: #2766
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
sbegaudeau pushed a commit that referenced this issue Dec 12, 2023
Bug: #2766
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
sbegaudeau pushed a commit that referenced this issue Dec 13, 2023
Bug: #2766
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant