zetkin / app.zetkin.org

Current-generation ("Gen 3") web interface for the Zetkin Platform.
https://app.dev.zetkin.org
24 stars 55 forks source link

Images can't be deleted from library #2307

Open richardolsson opened 1 month ago

richardolsson commented 1 month ago

Description

Along with the mass email feature, we introduced the "file library", where officials can upload files and use in emails, tasks and events. When users are in the process of creating an email, they may upload a bunch of images to try them out. But images that are uploaded there can't currently be deleted.

Steps to reproduce

  1. Go to https://app.dev.zetkin.org/organize/1
  2. Go to any project (or create a new one)
  3. Create a new email
  4. Go to the compose tab
  5. In the composer, add an image block – the library appears
  6. If the library is empty, upload an image

Expected Behaviour

Images in the library should present some sort of UI for deleting the images.

Actual Behaviour

There is no way of deleting images.

Screenshots (if you have any)

image

richardolsson commented 1 month ago

This task is a bit challenging because we want to be very careful about what we delete. Removing an image that is used in various places (events, emails etc) could cause problems in how those activities are rendered to users.

Maybe we should only allow deleting images that are not used anywhere? Or maybe we introduce some sort of "archive" instead of deleting them?