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 snack bar not displayed in MediaViewer #4195

Merged
merged 5 commits into from
Jan 27, 2025
Merged

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Jan 24, 2025

Content

The SnackBar was not displayed in the MediaViewer because it's in a Node which is displayed in Overlay mode. In this case, the Screen below (Messages or Gallery) is consuming the SnackBar. Using a local SnackbarDispatcher in MediaViewerPresenter fixes the issue. This is commit d36b413

c3e148b is closing the bottom sheet once an action is selected, to either leave space for the share native bottom sheet or the "saved" snackbar.

Other commits are cleanup.

Motivation and context

Closes #4128

Screenshots / GIFs

SaveSnackBar.mp4

Tests

  • Open an image and save it to disk.
  • You should see a confirmation snackbar.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • 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 define 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

@bmarty bmarty added the PR-Bugfix For bug fix label Jan 24, 2025
@bmarty bmarty requested a review from a team as a code owner January 24, 2025 16:38
@bmarty bmarty requested review from ganfra and removed request for a team January 24, 2025 16:38
Copy link
Contributor

📱 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/xoWgWx

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 83.35%. Comparing base (3668e86) to head (c3e148b).
Report is 8 commits behind head on develop.

Files with missing lines Patch % Lines
.../designsystem/utils/snackbar/SnackbarDispatcher.kt 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4195   +/-   ##
========================================
  Coverage    83.35%   83.35%           
========================================
  Files         1886     1886           
  Lines        49403    49404    +1     
  Branches      5804     5804           
========================================
+ Hits         41180    41181    +1     
  Misses        6134     6134           
  Partials      2089     2089           

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

Copy link
Member

@ganfra ganfra 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 changes, LGTM

@bmarty bmarty merged commit df82afb into develop Jan 27, 2025
29 of 30 checks passed
@bmarty bmarty deleted the feature/bma/snackBar branch January 27, 2025 08:52
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.

Downloading currently gives no feedback if it started or if it is finished
2 participants