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

Media gallery UI #4010

Merged
merged 31 commits into from
Dec 11, 2024
Merged

Media gallery UI #4010

merged 31 commits into from
Dec 11, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Dec 9, 2024

Content

Implement first version of media gallery.

Figma: https://www.figma.com/design/Ni6Ii8YKtmXCKYNE90cC67/Timeline-(new)?m=dev

This PR add new screens to be able to see all the media of a room: images and videos as a gallery (grid) and files as a list.

Will be done later:

  • render audio item in another way in the file list (see Figma)
  • month separators instead of day separator (waiting for change in the SDK api)
  • swipe media to left and right in the media viewer, to navigate through the images / videos.
  • search for media

Motivation and context

Screenshots / GIFs

Tests

  • From the timeline, click on an image Event.

  • Click on "info" picto and see the new bottom sheet

  • From the room detail screen, click on "Media and files"

  • See the gallery of images, that can be scrolled to load more media. It should load automatically until the page is full or the beginning of the room is reached

  • long click on an image to see the bottom sheet

  • click on an image to see it fullscreen

  • navigate to the file list

  • test the action on file

  • click on file

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

@bmarty bmarty requested a review from a team as a code owner December 9, 2024 16:28
@bmarty bmarty requested review from ganfra and removed request for a team December 9, 2024 16:28
@bmarty bmarty marked this pull request as draft December 9, 2024 16:28
Copy link
Contributor

github-actions bot commented Dec 9, 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/HqLrgD

@bmarty bmarty changed the title Feature/bma/media gallery UI Media gallery UI Dec 9, 2024
@bmarty bmarty added PR-Feature For a new feature Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. labels Dec 9, 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 Dec 9, 2024
@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Dec 9, 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 Dec 9, 2024
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.

Some first remarks and questions

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 79.63259% with 255 lines in your changes missing coverage. Please review.

Project coverage is 83.00%. Comparing base (c1c1264) to head (0113a52).
Report is 47 commits behind head on develop.

Files with missing lines Patch % Lines
...aries/mediaviewer/impl/gallery/MediaGalleryView.kt 74.56% 34 Missing and 25 partials ⚠️
.../mediaviewer/impl/gallery/MediaGalleryPresenter.kt 58.92% 37 Missing and 9 partials ⚠️
...id/libraries/mediaviewer/impl/gallery/MediaItem.kt 63.26% 13 Missing and 5 partials ⚠️
...iaviewer/impl/gallery/TimelineMediaItemsFactory.kt 52.77% 16 Missing and 1 partial ⚠️
...aries/mediaviewer/impl/gallery/EventItemFactory.kt 88.13% 0 Missing and 14 partials ⚠️
...es/mediaviewer/impl/viewer/MediaViewerPresenter.kt 51.72% 11 Missing and 3 partials ⚠️
...impl/details/MediaDeleteConfirmationBottomSheet.kt 83.75% 10 Missing and 3 partials ⚠️
...ies/mediaviewer/impl/gallery/VirtualItemFactory.kt 14.28% 12 Missing ⚠️
...ediaviewer/impl/details/MediaDetailsBottomSheet.kt 88.77% 3 Missing and 8 partials ⚠️
...braries/mediaviewer/impl/viewer/MediaViewerView.kt 56.00% 6 Missing and 5 partials ⚠️
... and 12 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4010      +/-   ##
===========================================
- Coverage    83.08%   83.00%   -0.09%     
===========================================
  Files         1821     1845      +24     
  Lines        46450    47683    +1233     
  Branches      5444     5631     +187     
===========================================
+ Hits         38594    39579     +985     
- Misses        5946     6108     +162     
- Partials      1910     1996      +86     

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

@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Dec 10, 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 Dec 10, 2024
@bmarty bmarty marked this pull request as ready for review December 10, 2024 16:15
I'll iterate on the various date format in a separate PR.
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.

Lets merge and iterate!

@bmarty bmarty merged commit 06d6ba1 into develop Dec 11, 2024
24 of 26 checks passed
@bmarty bmarty deleted the feature/bma/mediaGalleryUi branch December 11, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Feature For a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants