Skip to content

Added a feature to delete items by dragging and dropping them into the add-item area#1257

Open
ik2m wants to merge 2 commits intokando-menu:mainfrom
ik2m:feature/drag-and-drop-to-delete
Open

Added a feature to delete items by dragging and dropping them into the add-item area#1257
ik2m wants to merge 2 commits intokando-menu:mainfrom
ik2m:feature/drag-and-drop-to-delete

Conversation

@ik2m
Copy link
Copy Markdown
Contributor

@ik2m ik2m commented Jan 15, 2026

This PR adds the ability to delete menu items by dragging and dropping them into the "add-item area".

It is inspired by the discussion in #1250.

@ik2m ik2m changed the title Added a feature to delete items by dragging and dropping them into the add-item area. Added a feature to delete items by dragging and dropping them into the add-item area Jan 15, 2026
@Schneegans
Copy link
Copy Markdown
Contributor

Thank you so much for looking into this! Do you think that it could be possible to hide the buttons in bottom toolbar and instead show a text "Drop item here to delete it" if the user drags an item over the area?. I'm not sure how complicated that would be, but it would be very cool, I think!

@Schneegans Schneegans linked an issue Feb 21, 2026 that may be closed by this pull request
@Foxtrot-128
Copy link
Copy Markdown

Foxtrot-128 commented Feb 26, 2026

hey uhh.... maybe we'll pull this request and do the text about "dropping it here" after? it would be kind of more logical to chase functionality first and only then the looks... it has been a month after all ':}

@Schneegans
Copy link
Copy Markdown
Contributor

Yeah, we could do this. Although I would be more happy if the feature could be completed. And without this, this functionality will be hard to discover. @ik2m, do you think you could add this?

Besides, it would be a good idea to select the center item after deleting something, because else you may end up in a submenu if you delete something next to a submenu. For this, use this state:

const selectedChildPath = useAppState((state) => state.selectedChildPath);
const selectChildPath = useAppState((state) => state.selectChildPath);

and then call this after the deletion:

selectChildPath(selectedChildPath.slice(0, -1));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delete menu items by dragging them back into the new-item list

3 participants