Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix oversize padding on captioned images/videos #3732

Merged
merged 4 commits into from
Oct 29, 2024

Conversation

frebib
Copy link
Contributor

@frebib frebib commented Oct 23, 2024

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 element-hq/element-x-ios#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 element-hq/element-x-ios#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

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@frebib frebib requested a review from a team as a code owner October 23, 2024 23:25
@frebib frebib requested review from jmartinesp and removed request for a team October 23, 2024 23:25
@CLAassistant
Copy link

CLAassistant commented Oct 23, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

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

  • Your branch should be based on origin/develop, at least when it was created.
  • The title of the PR will be used for release notes, so it needs to describe the change visible to the user.
  • The test pass locally running ./gradlew test.
  • The code quality check suite pass locally running ./gradlew runQualityChecks.
  • If you modified anything related to the UI, including previews, you'll have to run the Record screenshots GH action in your forked repo: that will generate compatible new screenshots. However, given Github Actions limitations, it will prevent the CI from running temporarily, until you upload a new commit after that one. To do so, just pull the latest changes and push an empty commit.

Copy link

codecov bot commented Oct 23, 2024

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 ⚠️
Additional details and impacted files
@@             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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jmartinesp jmartinesp added Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. and removed Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. labels Oct 29, 2024
frebib and others added 4 commits October 29, 2024 13:23
Use consistent padding with the InReplyToView for the media, and
consistent caption padding with other textual messages.

Signed-off-by: Joe Groocock <[email protected]>
@jmartinesp jmartinesp added the PR-Bugfix For bug fix label Oct 29, 2024
@frebib
Copy link
Contributor Author

frebib commented Oct 29, 2024

Nice, thanks Jorge!

Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We can always iterate on it later, but it does look more like the figma designs.

It's a shame the screenshots are kind of broken, but that's a bug in Paparazzi as you mentioned.

@jmartinesp jmartinesp merged commit ab75bab into element-hq:develop Oct 29, 2024
24 of 25 checks passed
@jmartinesp jmartinesp deleted the frebib/fix-caption-padding branch October 29, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Bugfix For bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants