webstudio-is / webstudio

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
https://webstudio.is
GNU Affero General Public License v3.0
5.16k stars 609 forks source link

Inform the user when image they are trying to delete is used #572

Open rpominov opened 1 year ago

rpominov commented 1 year ago

https://discord.com/channels/955905230107738152/1050325557348409377

If we delete assets published projects can break. We should mark as deleted instead of deleting.

kof commented 1 year ago

And we need to consider how we would allow full deletion in the future by showing user all instances and asking them if they are ok with breaking those when deleting.

This is the case for all asset types, right now images and fonts, in the future more.

Webflow right now never fully deletes and never tells anyone. Once image is uploaded, its in the cloud forever (not even sure if they delete when user deletes a project and/or account, need to test that).

kof commented 1 year ago

me and @istarkov decided to not mark as deleted ever, because this will make it complicated to introduce a limitation logic, because if we mark as deleted, we have to still count it towards some limit, to prevent abuse.

It is better to go straight for the final solution and communicate to the user where asset is used and if they want to delete it still

kof commented 1 year ago

For now if user deletes an image, it can break a published site. It kinda makes sense, we just don't have a proper check yet.