Skip to content

Render media captions formatting in the media viewer#6729

Merged
jmartinesp merged 4 commits intoelement-hq:developfrom
bxdxnn:misc/media-viewer-caption
May 8, 2026
Merged

Render media captions formatting in the media viewer#6729
jmartinesp merged 4 commits intoelement-hq:developfrom
bxdxnn:misc/media-viewer-caption

Conversation

@bxdxnn
Copy link
Copy Markdown
Contributor

@bxdxnn bxdxnn commented May 5, 2026

Content

Motivation and context

Fixes #6506

Screenshots / GIFs

Tests

  • Open a media that has Markdown in the caption

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • This PR was made with the help of AI:
    • Yes. In this case, please request a review by Copilot.
    • No.
  • Changes have been tested on an Android device or Android emulator with API 24
  • 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 defines what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@bxdxnn bxdxnn requested a review from a team as a code owner May 5, 2026 17:20
@bxdxnn bxdxnn requested review from jmartinesp and removed request for a team May 5, 2026 17:20
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

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

  • If your pull request adds a feature or modifies the UI, this should have an equivalent pull request in the Element X iOS repo unless it only affects an Android-only behaviour or is behind a disabled feature flag, since we need parity in both clients to consider a feature done. It will also need to be approved by our product and design teams before being merged, so it's usually a good idea to discuss the changes in a Github issue first and then start working on them once the approach has been validated.
  • 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.

@github-actions github-actions Bot added the Z-Community-PR Issue is solved by a community member's PR label May 5, 2026
Comment thread tests/uitests/src/test/snapshots/images/appicon.element_Icon_en.png
@bxdxnn bxdxnn force-pushed the misc/media-viewer-caption branch from 7d51a4d to 9fd3f13 Compare May 6, 2026 06:20
Copy link
Copy Markdown
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.

Thanks for the contribution. I think the PR needs some more work, if you were using an AI agent I think it got some things wrong about the current setup 😅 .

Comment thread libraries/mediaviewer/impl/build.gradle.kts Outdated
Comment thread libraries/mediaviewer/impl/build.gradle.kts Outdated
@bxdxnn bxdxnn force-pushed the misc/media-viewer-caption branch from 2cbd345 to fab1f2d Compare May 6, 2026 06:58
Copy link
Copy Markdown
Contributor Author

@bxdxnn bxdxnn left a comment

Choose a reason for hiding this comment

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

Yes, sorry, this PR was vibecoded as there were some weird bugs that I wasn't able to solve because of media viewer flickering, but as I've fixed the media viewer this PR started to work automatically. I'll resolve the code smell manually.

@bxdxnn bxdxnn force-pushed the misc/media-viewer-caption branch from 2729f1b to 2e58349 Compare May 6, 2026 08:40
@bxdxnn bxdxnn force-pushed the misc/media-viewer-caption branch from 2e58349 to 887f37b Compare May 6, 2026 09:06
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

❌ Patch coverage is 91.83673% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.23%. Comparing base (a7711b7) to head (eeef6e4).
⚠️ Report is 10 commits behind head on develop.

Files with missing lines Patch % Lines
...es/mediaviewer/impl/datasource/EventItemFactory.kt 16.66% 0 Missing and 5 partials ⚠️
...braries/mediaviewer/impl/viewer/MediaViewerView.kt 85.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6729   +/-   ##
========================================
  Coverage    81.23%   81.23%           
========================================
  Files         2628     2628           
  Lines        73334    73424   +90     
  Branches      9484     9493    +9     
========================================
+ Hits         59572    59649   +77     
- Misses       10269    10277    +8     
- Partials      3493     3498    +5     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jmartinesp
Copy link
Copy Markdown
Member

I'm uploading a few quick fixes that should unblock this.

@jmartinesp jmartinesp merged commit 071d98c into element-hq:develop May 8, 2026
28 of 29 checks passed
@bxdxnn bxdxnn deleted the misc/media-viewer-caption branch May 8, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Media captions are unformatted in the media viewer

4 participants