wordpress-mobile / wordpress-mobile/WordPress-Android

[Reader Improvements] Improve rules for featured image in Post feed card

Open
#19,286 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Enhancement Reader
Dominant language
Kotlin
Stars
3.2k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
69

Description

I am opening this issue so we can try to implement some more specific rules for loading the featured image in the post card in the feeds, so they preserve the original aspect ration most of the time, without being too tall or too short.

I tried doing something related to this while working on the Post feed card new design implementation but it proved harder than expected, since we are setting the size and scaling of this image in 3 different places to achieve the final imageView:

  1. when forming the URL to get the image from backend / Photon
  2. in the XML layout, by setting some constraints
  3. in Glide when actually loading the URL from above, by setting some Transforms
Initial expected rules

Full discussion ref: p1695993418154159-slack-C05N140C8H5

We can aim to keep as close to the original image content as possible for most images. Then crop for very wide or very large. Rather than having a set aspect ratio that crops the majority of images.

ref: p1695994450160959/1695993418.154159-slack-C05N140C8H5

[...] I think vertically, having the max height as something like 6(w):9(h) might make sense. As taller than that, it will not be visible in one scroll area. for width I think if we applied a min height of about 80px, that will stop any crazy super wide, super tiny images.

ref: p1696005375104389/1695993418.154159-slack-C05N140C8H5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the post feed card image through the three locations named in the issue: the backend/Photon URL, the XML layout constraints, and Glide transforms. Compare the current behavior with the proposed 6:9 maximum height and roughly 80px minimum height rules. Done means preserving original aspect ratios for most images while cropping extremely wide or tall images.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.