Eraser tool update
Eraser tool
This update introduces the eraser tool, which allows users to delete placed snippets under certain conditions. The eraser tool is part of a larger effort to enhance user interaction within our application.
All snippets which are not allowed to be erased by the user (in case the snip is too old or it was placed by another user) are shown muted such that deletable snippets are highlighted. Additionally, on mouseover, we apply a drop shadow to all selectable elements.
For more context, please see the related issue #33 (closed) .
Key Features
- User-Specific Deletion: Users can delete snippets they placed within the last 5 minutes. This time limit can be adjusted via an environment configuration.
- Visual Cues: Snippets that cannot be erased (either because they are too old or were placed by another user) are shown muted. Deletable snippets are highlighted.
- Mouseover Effects: On mouseover, all selectable elements (deletable snippets) will display a drop shadow for better visual feedback.
Technical Details
- Generalized Interaction Events Framework: This update builds on the previously introduced interaction events framework used for text highlighting. The framework is now generalized, allowing for easy reuse in future updates to implement visual feedback for various user interactions such as hover, click, and other
- Rust Subpackage for WebAssembly: We have integrated a small Rust subpackage, compiled into WebAssembly, to handle performance-critical code. Currently, this is used to compute bounding boxes for doodles with simd operations.
Todos:
Before this update can be finalized and merged, the following tasks need to be completed:
-
Update documentation to include eraser tool -
Add a server side check for the 5min threshold and user ownership requirements for deletion -
Multi client synchronization events are not triggered by erase -
Only show tool when user is allowed to delete i.e. pDelete perms
Edited by Sebastian Bernd Mohr