Details
-
Task
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
None
-
None
Description
Problem: When a user deletes an asset, it can be in-use in other qml files in the project. This can cause small harm like in the case of images where the components using the deleted image just don't render. Or a slightly bigger harm in the case of deleting an effect where a big black error message appears in the 3D Editor. One could argue that showing the black error msg is enough to warn the user of the issue.
There is no clear solution with no downsides to this problem. Below are some suggestion from discussions with Amr and Miikka.
1. Add a new file that keeps ref of used assets and in which components.
pros: fast way to delete referenced assets.
cons: book keeping, easy to get out of sync, quite some effort to implement.
2. Grep the project for ref assets and remove them on the spot:
pros: easy to implement, no sync/bookkeeping issues.
cons: could be expensive for large projects (probably worth a try).
3. Do suggestion 2 only on first delete asset request and keep an in-memory cache of the assets refs + file watcher to update the cache on changes to refs.
pros: improvement in performance to suggestion 2.
cons: some effort to implement correctly, also partially suffers from issues of suggestion 2.
4. Scan and update refs of currently open doc only + show a generic warning message that assets might be in-use in other files, are you sure?.
pros: logical, easy to do.
cons: puts the responsibility on the user (which should be ok).
5. Do nothing, current error messages are enough to let the user know that he missed-up and needs to fix.
We need some both research on UX and technical implementation before agreeing on the best solution.