sanity-io / sanity-plugin-media

Asset management plugin for Sanity
MIT License
160 stars 51 forks source link

Add tags to multiple selected images #218

Open MarcelloTheArcane opened 4 months ago

MarcelloTheArcane commented 4 months ago

Is your feature request related to a problem? Please describe. I'm just starting to use this plugin, with an image library of approximately 10,000 images. There's a lot of similar types of images, for example "product photo" or "lifestyle photo", and it would be really helpful if it was possible to select multiple images and add a tag to all of them. Currently the only options when multi-selecting is to deselect or delete.

Describe alternatives you've considered I'm currently opening each image and tagging individually, which is fine but is quite repetitive when tagging multiple images with identical tags. I'm not aware of any other way to do this.

Additional context Screenshot 2024-07-08 104648

MarcelloTheArcane commented 4 months ago

I guess it needs the FormFieldInputTags component added into the PickedBar component?

I'm happy to do this, but haven't ever developed a Sanity plugin before.

I'm not sure how the UI should handle the tag list - either it could be empty (even if the images have tags already) and be append-only, or else it could be a list of all tags in common, or else all tags regardless (to allow removing). In the latter case, only newly added tags should be inserted to the images, however this might not be intuitive.

For example -

Image 1 has tags A, B, and C. Image 2 has tags A, B, and D.

Should the combind tags list show:

  1. No tags
  2. A, B
  3. A, B, C, D
  4. Something else?