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

feat: image preview improvements [WPB-8801] #3019

Merged
merged 3 commits into from
May 27, 2024

Conversation

Garzas
Copy link
Contributor

@Garzas Garzas commented May 21, 2024

TaskWPB-8801 [Android] preview images and files when sending them through files button


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

  • Merged MultipleVisible SingleVisible AssetTooLargeDialogState into one
  • Extracted checking assets size to separate CheckAssetRestrictionsViewModel
  • Moved sending assets functionality to only ConversationScreen
  • Fixed formatSize in DeviceUtil
  • Moved some composables to ui-common
  • Added loading indicator for loading images preview
  • Added error indicator and error icon for images in ImportMediaScreen
  • Added ArgsSerializer to parse return values from screen not supported by compose destinations library

Dependencies (Optional)

If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@Garzas Garzas self-assigned this May 21, 2024
Copy link
Contributor

github-actions bot commented May 21, 2024

Test Results

932 tests  ±0   932 ✅ ±0   15m 38s ⏱️ +34s
124 suites ±0     0 💤 ±0 
124 files   ±0     0 ❌ ±0 

Results for commit 9860c0e. ± Comparison against base commit f6c35c0.

♻️ This comment has been updated with latest results.

@AndroidBob
Copy link
Collaborator

Build 4843 failed.

@AndroidBob
Copy link
Collaborator

Build 4846 failed.

Copy link

sonarcloud bot commented May 21, 2024

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@codecov-commenter
Copy link

codecov-commenter commented May 21, 2024

Codecov Report

Attention: Patch coverage is 27.27273% with 32 lines in your changes are missing coverage. Please review.

Project coverage is 44.42%. Comparing base (f6c35c0) to head (9860c0e).

Additional details and impacted files
@@                       Coverage Diff                       @@
##           feat/multiple-image-preview    #3019      +/-   ##
===============================================================
- Coverage                        44.50%   44.42%   -0.08%     
===============================================================
  Files                              447      449       +2     
  Lines                            14548    14558      +10     
  Branches                          2499     2502       +3     
===============================================================
- Hits                              6474     6467       -7     
- Misses                            7371     7381      +10     
- Partials                           703      710       +7     
Files Coverage Δ
.../ui/home/conversations/MessageComposerViewState.kt 84.84% <100.00%> (+4.84%) ⬆️
...id/ui/sharing/ImportMediaAuthenticatedViewModel.kt 0.00% <0.00%> (ø)
...onversations/media/preview/ImagesPreviewNavArgs.kt 0.00% <0.00%> (ø)
.../conversations/media/preview/ImagesPreviewState.kt 0.00% <0.00%> (ø)
...versations/media/preview/ImagesPreviewViewModel.kt 0.00% <0.00%> (ø)
...rc/main/kotlin/com/wire/android/util/DeviceUtil.kt 0.00% <0.00%> (ø)
...android/ui/home/conversations/model/AssetBundle.kt 42.85% <20.00%> (-10.09%) ⬇️
.../conversations/sendmessage/SendMessageViewModel.kt 78.60% <50.00%> (-3.48%) ⬇️
...ersations/media/CheckAssetRestrictionsViewModel.kt 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6c35c0...9860c0e. Read the comment docs.

Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 4862 succeeded.

The build produced the following APK's:

@Garzas Garzas merged commit 501ac26 into feat/multiple-image-preview May 27, 2024
13 checks passed
@Garzas Garzas deleted the feat/image-preview-improvements branch May 27, 2024 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants