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: add bottom sheet options to images and files on conversation media gallery [WPB-9049] #3337

Merged

Conversation

saleniuk
Copy link
Contributor

@saleniuk saleniuk commented Aug 18, 2024

TaskWPB-9049 [Android] Add options to files in the media gallery


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?

In order to make the implementation of these bottom sheets easier and make the code more dev-friendly, some other small adjustments were also made to the code. Here’s the full list of changes included in this PR:

  • added bottom sheet options menu for images and files on conversation media screen (long-click on item to open)
  • fixed duplicated “delete” button on asset options menu
  • cleaned-up messageOptionsMenuItems to make it unified with other from this package, removed handling of closing the menu here, this is now handled directly in the bottom sheet
  • implemented handling action label for common SnackBarMessageHandler and actionLabel property to SnackBarMessage so that it can be easily added and used and the whole handler can be reused in the app
  • removed passing the whole map of audio messages state to each message list item, instead just pass the audio state of this given item or null
  • extracted bottom sheets from ConversationScreen to dedicated files: MessageOptionsModalSheetLayout and SelfDeletionOptionsModalSheetLayout
  • fixed showing MediaAssetImage on previews
  • added previews for images and files lists, ConversationMediaScreen and bottom sheets on multiple screen

Testing

How to Test

Open conversation media screen and long-click on any item.

Attachments (Optional)

Screen_recording_20240818_103722.mp4

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.

Copy link

Ups 🫰🟨

This PR is too big. Please try to break it up into smaller PRs.

@echoes-hq echoes-hq bot added the echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. label Aug 18, 2024
Copy link

sonarcloud bot commented Aug 18, 2024

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 4.16667% with 46 lines in your changes missing coverage. Please review.

Project coverage is 44.55%. Comparing base (717e1e9) to head (a7d5508).

Files Patch % Lines
...d/ui/home/conversations/media/FileAssetsContent.kt 0.00% 23 Missing ⚠️
.../ui/home/conversations/media/ImageAssetsContent.kt 0.00% 16 Missing ⚠️
...d/ui/home/conversations/ConversationMessageType.kt 25.00% 6 Missing ⚠️
...n/kotlin/com/wire/android/model/SnackBarMessage.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3337      +/-   ##
===========================================
- Coverage    44.66%   44.55%   -0.12%     
===========================================
  Files          456      458       +2     
  Lines        15380    15419      +39     
  Branches      2572     2572              
===========================================
  Hits          6870     6870              
- Misses        7785     7824      +39     
  Partials       725      725              
Files Coverage Δ
...conversations/messages/item/MessageTypesPreview.kt 0.00% <ø> (ø)
.../conversations/messages/item/RegularMessageItem.kt 0.00% <ø> (ø)
...ndroid/ui/home/conversations/model/MessageTypes.kt 85.00% <ø> (ø)
...n/kotlin/com/wire/android/model/SnackBarMessage.kt 0.00% <0.00%> (ø)
...d/ui/home/conversations/ConversationMessageType.kt 38.09% <25.00%> (-6.35%) ⬇️
.../ui/home/conversations/media/ImageAssetsContent.kt 0.00% <0.00%> (ø)
...d/ui/home/conversations/media/FileAssetsContent.kt 0.00% <0.00%> (ø)

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 717e1e9...a7d5508. Read the comment docs.

Copy link
Contributor

Built wire-android-staging-compat-pr-3337.apk is available for download

Copy link
Contributor

Built wire-android-dev-debug-pr-3337.apk is available for download

@saleniuk saleniuk requested review from Garzas, a team, yamilmedina, borichellow, MohamadJaara and vitorhugods and removed request for a team August 19, 2024 06:26
Copy link
Contributor

@alexandreferris alexandreferris left a comment

Choose a reason for hiding this comment

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

Amazing work 💪🏻

@saleniuk saleniuk added this pull request to the merge queue Aug 19, 2024
Merged via the queue into develop with commit f6561f6 Aug 19, 2024
11 of 12 checks passed
@saleniuk saleniuk deleted the feat/conversation-media-gallery-bottom-sheet-options branch August 19, 2024 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants