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

Rework on media module #3967

Merged
merged 11 commits into from
Dec 2, 2024
Merged

Rework on media module #3967

merged 11 commits into from
Dec 2, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Nov 29, 2024

Content

Move code from the api module to the impl module and rearrange package organisation.
Also split code between multiple files.

Motivation and context

Improve build time and prepare work for media browser

Screenshots / GIFs

No change expected.

Tests

  • No change expected

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

import io.element.android.libraries.textcomposer.model.TextEditorState
import io.element.android.libraries.textcomposer.model.aTextEditorStateMarkdown

open class AttachmentsPreviewStateProvider : PreviewParameterProvider<AttachmentsPreviewState> {
override val values: Sequence<AttachmentsPreviewState>
get() = sequenceOf(
anAttachmentsPreviewState(),
anAttachmentsPreviewState(mediaInfo = aVideoMediaInfo()),
anAttachmentsPreviewState(mediaInfo = anAudioMediaInfo()),
anAttachmentsPreviewState(mediaInfo = anApkMediaInfo()),
Copy link
Member Author

@bmarty bmarty Nov 29, 2024

Choose a reason for hiding this comment

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

Since the content is not the real content anymore, there is no need to have multiple identical previews.

Copy link
Contributor

github-actions bot commented Nov 29, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/W1kqVM

@bmarty bmarty added Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. PR-Misc For other changes labels Nov 29, 2024
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Nov 29, 2024
@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Nov 29, 2024
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Nov 29, 2024
@bmarty bmarty force-pushed the feature/bma/mediaModule branch from 9cf4433 to d37ec23 Compare November 29, 2024 10:49
@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Nov 29, 2024
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Nov 29, 2024
@bmarty bmarty marked this pull request as ready for review November 29, 2024 11:05
@bmarty bmarty requested a review from a team as a code owner November 29, 2024 11:05
@bmarty bmarty requested review from jmartinesp and removed request for a team November 29, 2024 11:05
Remove obsolete items
Reorder items.
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 64.64286% with 99 lines in your changes missing coverage. Please review.

Project coverage is 83.06%. Comparing base (31f9fa2) to head (1b10aa4).
Report is 34 commits behind head on develop.

Files with missing lines Patch % Lines
...ies/mediaviewer/impl/local/video/MediaVideoView.kt 51.63% 54 Missing and 5 partials ⚠️
...s/mediaviewer/impl/DefaultMediaViewerEntryPoint.kt 0.00% 21 Missing ⚠️
...ediaviewer/impl/local/DefaultLocalMediaRenderer.kt 0.00% 9 Missing ⚠️
...libraries/mediaviewer/impl/local/LocalMediaView.kt 88.88% 1 Missing and 2 partials ⚠️
...aries/mediaviewer/impl/local/file/MediaFileView.kt 95.74% 0 Missing and 2 partials ⚠️
...braries/mediaviewer/impl/local/pdf/MediaPdfView.kt 81.81% 1 Missing and 1 partial ⚠️
.../impl/util/FileExtensionExtractorWithValidation.kt 60.00% 1 Missing and 1 partial ⚠️
...ies/mediaviewer/impl/local/image/MediaImageView.kt 94.44% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3967      +/-   ##
===========================================
+ Coverage    83.01%   83.06%   +0.05%     
===========================================
  Files         1795     1804       +9     
  Lines        45549    45587      +38     
  Branches      5370     5373       +3     
===========================================
+ Hits         37812    37869      +57     
+ Misses        5857     5832      -25     
- Partials      1880     1886       +6     

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

@bmarty bmarty requested review from ganfra and removed request for jmartinesp December 2, 2024 08:02
Copy link

sonarqubecloud bot commented Dec 2, 2024

@bmarty bmarty merged commit 6592e3e into develop Dec 2, 2024
24 of 25 checks passed
@bmarty bmarty deleted the feature/bma/mediaModule branch December 2, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Misc For other changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants