clutch
clutch copied to clipboard
I deleted a jpeg and now the whole app crashes
How to reproduce
- Put an image on the screen.
- Delete it from the media manager.
Describe the bug
I deleted a jpeg and now my whole app crashes. If you delete an image, worst that should happen is maybe it doesn't show up or a warning. We can't have the whole app crash over this.
Expected behavior
No response
Operating System
Chrome 112 (macOS Catalina)
Clutch Version
No response
Other
No response
@andressaroberts does the app crash, or just the frame when it's being used.
@magalhas @AndrePessoa this feels more like a feature to be discussed. Ideally, if you try to remove an asset that's being used, we should alert the user first, and if they want to carry with the deletion, I guess we should remove the reference everywhere.
Well if the asset is being imported from a source file it is hard to know it is being used unless we have some kind of static code analysis in place which is way too big of a feature to be considered right now. Did you had something else in mind?
@diegomedina248 , I like your suggestion. As we decide to split the "Clutch way" and the "code way", I agree that we should have this polished UX on the UI, alerting about the use impact of removing (an alert modal) and removing all references of it on the instances. The @magalhas case is pretty possible, but if someone is using the code approach, Next's code-driven alert interface seems good to me: . using UI to use, use UI to delete, use UI to understand the effects = we should try to resolve . using code to use = we should show the error code console to any error
Yeah, exactly, those two different paths. I think we can leave the error for now if you used the asset in code, though in the future would be nice to detect.
Both solutions though seem more like a feature, do we want to address either at this point? And if not, what should we do now regarding this issue?
I'd go ahead and create a ticket for the new feature and maybe work on it and mark this one as depending on it.