Added a feature to delete items by dragging and dropping them into the add-item area#1257
Added a feature to delete items by dragging and dropping them into the add-item area#1257ik2m wants to merge 2 commits intokando-menu:mainfrom
Conversation
|
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! |
|
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 ':} |
|
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)); |
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.