element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.23k stars 2k forks source link

Ability to collapse/hide image thumbnails ad hoc or in bulk #22113

Open williamkray opened 2 years ago

williamkray commented 2 years ago

Your use case

What would you like to do?

I would like the ability to collapse image thumbnails individually, or all image thumbnails visible in the window at once using a slash-command like /collapse

Why would you like to do it?

Most of the time, I prefer to have image thumbnails rendered for visibility, but sometimes someone may share content that is distracting, inappropriate for the current environment (NSFW), etc. In these situations, the only options are to disable all thumbnail rendering throughout the application, or delete the offending image (only an option if I happen to be an administrator of the room, and not always an appropriate response).

There are also some times when lots of images are uploaded in succession, and it would be nice to temporarily shrink the amount of space that they take up to see the surrounding contextual conversation without needing to see the thumbnails. Again, this should not require changing the applications settings back and forth, which is clunky.

This has been a feature of Slack for a very long time.

How would you like to achieve it?

Similarly to how Slack achieves it: each thumbnail should include an arrow next to it, and clicking this arrow would collapse/expand the image thumbnail. Similarly, the/collapse command could be used to toggle to "collapsed" all image thumbnails in recent memory in that room.

Have you considered any alternatives?

Disabling the application settings to "Show previews/thumbnails for images", but this has a few major failures at solving the above problems:

Additional context

This issue was opened in response to PR 4349 being closed and not added to the codebase. It refers to the alternative solutions suggested in that conversation.

grimhilt commented 1 year ago

Concerning the particular case where there are a lot of successive uploads, I personally like the WhatsApp way which is to regroup everything in one "message". image (here are 6 times the same picture)

t3chguy commented 1 year ago

@grimhilt that's https://github.com/vector-im/element-meta/discussions/754