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

Add a bulk delete feature #3840

Closed
4 tasks done
apsinghdev opened this issue Mar 27, 2024 · 13 comments · Fixed by #3885
Closed
4 tasks done

Add a bulk delete feature #3840

apsinghdev opened this issue Mar 27, 2024 · 13 comments · Fixed by #3885

Comments

@apsinghdev
Copy link
Contributor

apsinghdev commented Mar 27, 2024

Current Behavior

I made a project in which I added some unnecessary blocks. then I found a way to improve my project so I have to remove those extra blocks but picking a block and dragging it to the trashcan is tiring and time-consuming when there are a lot of blocks to remove.

Desired Behavior

Wouldn't be a nice idea to to be able to select the blocks in bulk, hit the 'delete' key and all the blocks disappear?

Screenshots / Mockups

Blocks I have to delete

bulk-delete

Implementation

  1. Add logic to select the screen when a use left-click + drag
  2. Select all the blocks that come under the selected screen area.
  3. Delete the selected blocks when the user hits the "delete" key.

Acceptance Tests

All the blocks should be deleted similar to how we delete by dragging to trashcan.

Environment

  • Operating System: [e.g., Windows, macOS, Linux]
  • Browser (if applicable): [e.g., Chrome, Firefox, Safari]
  • Version of Software/Project: [e.g., v1.0.0]

Checklist

  • I have read and followed the project's code of conduct.
  • I have searched for similar issues before creating this one.
  • I have provided all the necessary information to understand and reproduce the issue.
  • I am willing to contribute to the resolution of this issue.

Thank you for contributing to our project! We appreciate your help in improving it.

📚 See contributing instructions.

🙋🏾🙋🏼 Questions: Community Matrix Server.

@apsinghdev
Copy link
Contributor Author

@walterbender sir, what're your thoughts on this?

@walterbender
Copy link
Member

I've wondered about a good way to do this for some time. Maybe some sort of select-all or select with shift or ctrl.

@apsinghdev
Copy link
Contributor Author

I've wondered about a good way to do this for some time. Maybe some sort of select-all or select with shift or ctrl.

what I have in my mind is selecting something like this (left-click+drag) and then pressing the delete button ( on the keyboard ) to delete all the selected elements.

similar to this:

2024-03-27.23-43-16.mp4

@walterbender
Copy link
Member

That would work in most situations. Maybe it is a 2-d drag. But what about tablet devices?

@apsinghdev
Copy link
Contributor Author

That would work in most situations. Maybe it is a 2-d drag. But what about tablet devices?

I think for tablet devices we can implement a touch gesture for selecting multiple blocks on tablet devices. Users can tap and hold to initiate the selection, then drag to expand the selection area. we can change the color of selected blocks as an indication.

To delete the blocks, In place of the "delete" key, we can provide a delete button or icon that appears when multiple blocks are selected. This button can be easily accessible on the screen for users to tap and delete the selected blocks.

@divyanash911
Copy link
Contributor

Can we have a "select" button which on pressing, takes us into selection mode. On clicking any block in select mode , it gets selected so we can select multiple blocks just by single click or tapping. After that we can perform bulk operations for them like delete. This also broadens the scope of bulk features that can be implemented say copying as well. What are your thoughts on this @walterbender @apsinghdev ?

@apsinghdev
Copy link
Contributor Author

apsinghdev commented Mar 28, 2024

Can we have a "select" button which on pressing, takes us into selection mode. On clicking any block in select mode , it gets selected so we can select multiple blocks just by single click or tapping. After that we can perform bulk operations for them like delete. This also broadens the scope of bulk features that can be implemented say copying as well. What are your thoughts on this @walterbender @apsinghdev ?

@divyanash911 Yes, it's what I proposed for tablet devices. but instead of adding a "select" button and "selection mode", my idea is to just let the user tap and hold on a block to start the selection and after that just click once on other blocks to select. Finally, delete using the icon.

For computer devices, In my opinion, Music Blocks is mostly used on Computer devices (though I am not sure). so selecting the screen using a 2-D drag is quite intuitive and easier to implement as we won't be required to maintain a state (for mode) ig. using both the approaches in conjunction may be good idea? @walterbender can provide better thoughts.

@walterbender
Copy link
Member

Right now, a long press will invoke the same response as a right click--to bring up the secondary pie menu. I suppose we could use that menu to set the user initiate a bulk select.

@divyanash911
Copy link
Contributor

Right now, a long press will invoke the same response as a right click--to bring up the secondary pie menu. I suppose we could use that menu to set the user initiate a bulk select.

So we add an option to bulk select blocks in that pie menu ? And in bulk select mode we can delete using a separate button? Or have I misunderstood the workflow?

@walterbender
Copy link
Member

In general, I think a bulk select could be useful (bulk drag, for example). So I think we need bulk select and perhaps repurpose the delete button.

@divyanash911
Copy link
Contributor

In general, I think a bulk select could be useful (bulk drag, for example). So I think we need bulk select and perhaps repurpose the delete button.

So instead of a delete button, we can have a select button and a new delete button which pops up like when you single click a block?

@walterbender
Copy link
Member

I wouldn't say "instead of". But if you have used bulk select, then the existing delete button will delete everything selected instead of just the one block.

@apsinghdev
Copy link
Contributor Author

I wouldn't say "instead of". But if you have used bulk select, then the existing delete button will delete everything selected instead of just the one block.

this approach I think is better as it can be implemented with less code and it also solves the problem of tablet devices. all we need to do is give the "delete" button another purpose when multiple blocks are selected.

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.

3 participants