element-hq / element-x-android

Android Matrix messenger application using the Matrix Rust Sdk and Jetpack Compose
GNU Affero General Public License v3.0
1.08k stars 155 forks source link

Fix oversize padding on captioned images/videos #3732

Closed frebib closed 2 weeks ago

frebib commented 3 weeks ago

Content

Use consistent padding with the InReplyToView for the media, and consistent caption padding with other textual messages.

Note: The screenshots look kinda broken, but it looks like they were broken before my changes. This renders fine in-app and I've been using this patch for several weeks already.

Motivation and context

It bothered me that the padding around captioned images vs reply blocks was different. Judging by https://github.com/element-hq/element-x-ios/issues/3436 it looks like the behaviour in this PR is more aligned with what iOS does too.

This change does also suffer from the issue outlined in https://github.com/element-hq/element-x-ios/issues/3436 too although I'm not sure that's a new problem.

Screenshots / GIFs

Before After
Screenshot_20241024-003425.png Screenshot_20241024-003824.png

Tests

Tested devices

Checklist

CLAassistant commented 3 weeks ago

CLA assistant check
All committers have signed the CLA.

github-actions[bot] commented 3 weeks ago

Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible:

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 86.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 83.04%. Comparing base (870ae5f) to head (012e15e). Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
...s/impl/timeline/components/TimelineItemEventRow.kt 77.77% 2 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3732 +/- ## =========================================== - Coverage 83.06% 83.04% -0.02% =========================================== Files 1754 1755 +1 Lines 44022 44032 +10 Branches 5144 5148 +4 =========================================== + Hits 36565 36566 +1 - Misses 5635 5638 +3 - Partials 1822 1828 +6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

frebib commented 2 weeks ago

Nice, thanks Jorge!