thunder-app / thunder

Thunder - An open-source cross-platform Lemmy client for iOS and Android built with Flutter
https://thunderapp.dev
GNU Affero General Public License v3.0
776 stars 67 forks source link

Apply some visual indicator when an image is cropped in the card view #1418

Open K4LCIFER opened 3 months ago

K4LCIFER commented 3 months ago

Is Your Feature Request Related to a Problem?

It can be easy to mistake a cropped image for being the full image if it is cropped without any indicator in card view.

Feature Description

I propose some sort of visual indicator to appear on the edge where the cropping has occurred. It could be a sort of gradient darkening/blurring at the edge, or some symbol, or text.

Alternative Solutions

No response

Additional Context

No response

hjiangsu commented 3 months ago

I propose some sort of visual indicator to appear on the edge where the cropping has occurred. It could be a sort of gradient darkening/blurring at the edge, or some symbol, or text.

I'm assuming this is for the fixed-height view? If so, the underlying issue right now is that Thunder doesn't actually have the width/height information for a given image since it doesn't come from the API.

As a work-around, we have to manually fetch that information when we parse through the posts (which can be an expensive network operation because we have to fetch the image first). Fun fact: this is also the reason why the default view for Thunder is the fixed-height view rather than the full-height view!

When full-height images is disabled, we don't go through the process of fetching image dimensions, so it's not possible for us to know if the image is cropped or not. Luckily, it seems like width/height information could be coming to a future version of Lemmy (https://github.com/LemmyNet/lemmy/issues/3328) - in which case, this would then be feasible!