Commit Graph

365 Commits

Author SHA1 Message Date
ElementBot 03304b3ece Sync Strings (#7192)
* Sync Strings from Localazy

* Update screenshots

---------

Co-authored-by: jmartinesp <480955+jmartinesp@users.noreply.github.com>
2026-07-13 12:21:55 +02:00
Benoit Marty 28abf3049e Cleanup AndroidManifest.xml files. 2026-07-08 11:55:50 +02:00
Benoit Marty 1ddb32645c Merge pull request #7007 from element-hq/renovate/androidx.compose.material3-material3-1.x
Update dependency androidx.compose.material3:material3 to v1.5.0-alpha21
2026-07-06 18:31:45 +02:00
Benoit Marty 8840e2f96b Merge pull request #7112 from element-hq/feature/bma/galleryMessages
Support gallery messages
2026-07-03 14:09:20 +02:00
Benoit Marty 74f69b7eb3 Optimize code 2026-07-03 09:50:35 +02:00
Benoit Marty c1dfd6d6ae A11Y: Improve talkback for video and image / preview not preview. 2026-07-02 11:10:14 +02:00
Benoit Marty 01c8064a16 Fix accessibility: add content description to video preview (#6382)
Set contentDescription on the ExoPlayer PlayerView so TalkBack announces
the video preview to screen reader users instead of treating it as
decorative/invisible content.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 17:52:56 +02:00
Benoit Marty 16eec4d024 Simplify code 2026-06-30 12:33:10 +02:00
Benoit Marty 79163b68b5 Fix quality issues 2026-06-29 11:50:28 +02:00
Benoit Marty dd3beb11bd Add unit test on GalleryMediaGalleryDataSource and simplify the code. 2026-06-29 10:28:10 +02:00
Benoit Marty fb7bc50cdb Rename test class. 2026-06-29 10:15:28 +02:00
Benoit Marty 1a5336e650 Add missing test on EventItemFactory 2026-06-29 10:15:00 +02:00
Benoit Marty 95e656cc32 Fix regression on tests. 2026-06-29 09:11:51 +02:00
Benoit Marty b62242cdd2 Fix sharing gallery from pinned event timeline. 2026-06-26 17:36:27 +02:00
Benoit Marty a7e6d8af6e Better fix to render all items in the gallery. Should be able to render mixed items. 2026-06-26 16:24:57 +02:00
bxdxnn 87aff40b26 Support gallery messages (#6519)
* Support gallery messages

* Address review

* Remove unused function

* Fix indent

* Add "Gallery" message prefix

* Support galleries for image editing

* Fix tapping on a tile opens the last item

* Fix overflow count

* Add caption editing to gallery messages

* Use the new gallery string for prefix

* Lock sending galleries behind a feature flag

* Fix detekts

* Fix

* Ensure image edition is saved when navigating

* Fix sending media broken on edited gallery.

* Fix tests

* Order imports

* Remove unused parameters.

* Fix copyright header of new files.

* Fix Konsist test

* Extract new previews to a dedicated file.

* Sync strings

* Remove unused import

* Update screenshots

* Trigger CI

* Remove parameters with default value.

* More cleanup

* Restore sendAsFile behavior.

* Improve Preview.

* Improve Preview.

* Improve Preview.

* Fix gallery sending cancel and retry issue

* Ensure any previous job is cancelled.

* Fix issue in summary message

* Gallery feature is disabled by default.

* Kotlin convention

* Remove useless parenthesis

* Update screenshots

* Fix test

* List -> ImmutableList

* Remove useless code.

* Render formatted caption for attachment list.

* Replace set of Booleans by an enum

* Remove unused model for individual caption in a gallery Event.

* Fix tests

* Fix tests

* Rework MediaViewer entry point.

And ensure that the clicked image from the gallery is displayed first.

* Ensure gallery item can be click in the pinned message list
Improve the gallery item click handling code.

* Improve code and fix separator color
Closes #7101

* React on attachment item click
Improve code

* Improve code and support 0 items in gallery.

* Fix click on attachment item not rendering anything.

---------

Co-authored-by: Benoit Marty <benoitm@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: ElementBot <android@element.io>
2026-06-26 16:00:56 +02:00
Benoit Marty 123037a612 Fix broken preview of BottomSheet in Android Studio. 2026-06-19 14:04:46 +02:00
Benoit Marty 82c6167441 Bottom sheet: initial state must be Hidden else there is no animation when opening the bottom sheet. 2026-06-19 10:38:20 +02:00
Benoit Marty 3a2f19f26c Fix deprecation warning 2026-06-18 18:44:43 +02:00
Benoit Marty c430877d87 Ensure Robolectric test are run using API 36 until the library support API 37. 2026-06-18 12:18:32 +02:00
Jorge Martin Espinosa 8e9c0bedf2 Fix sharing media inside the app (#7016)
When a `MediaSource` is disposed, the local temp file associated to it will be deleted from disk.

When we try sharing a media from the media viewer screen to another room, this will dismiss the screen, which in turn will dispose of the media source and remove the file, which then fails to be shared.

If we copy it first and then make sure we delete it after trying to send it, it works fine.
2026-06-16 16:42:59 +02:00
ElementBot d39b208099 Sync Strings from Localazy (#7021)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-06-16 12:59:45 +02:00
renovate[bot] f0a6cba6db fix(deps): update android.gradle.plugin to v9 (major) (#6021)
* Update android.gradle.plugin to v9

* Separate extensions between app and library ones

`CommonExtension` has been split and its properties are now duplicated in `ApplicationExtension` and `LibraryExtension` without a shared interface, so we now need to duplicate the helper extension functions

* Bump Gradle wrapper to `9.3.1`

* Remove `kotlin-android` plugin usage: it's no longer needed

* Enable `resValues` build feature for the modules that have resources in custom variants like gplay, debug, etc.

Otherwise this now fails saying the resources are there but the feature is disabled

* Remove `retrofit` dependency from `:features:call:impl`

It wasn't in use and the build was failing

* Update kotlin to v2.4.0

* Update plugin paparazzi to v2.0.0-alpha05

* Update gradle wrapper to 9.5.1

./gradlew wrapper --gradle-version 9.5.1 --gradle-distribution-sha256-sum bafc141b619ad6350fd975fc903156dd5c151998cc8b058e8c1044ab5f7b031f

* Update com.android.tools.build:gradle to 9.2.1

* Update plugin sonarqube to v7.3.1.8318

* Kotlin 2.4.0

* Context parameters are enabled by default in Kotlin 2.4.0

* Fix code issue

* Fix record screenshot issue

* Workaround for https://github.com/cashapp/paparazzi/issues/2342

* Workaround for another issue with Paparazzi

* Remove unused import

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: Benoit Marty <benoitm@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: ElementBot <android@element.io>
2026-06-11 09:51:47 +02:00
ElementBot 5a4c0b5d58 Sync Strings from Localazy (#6986)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-06-08 14:33:40 +02:00
Benoit Marty d54f10046d Ensure the video preview can be played several times.
Closes #6956
2026-06-04 16:55:31 +02:00
Benoit Marty 41b4a56681 Merge pull request #6938 from element-hq/feature/bma/mediaDetailsUpdate
[Media bottom sheet] UI iteration
2026-06-02 16:20:05 +02:00
Benoit Marty 1aef3860c2 [Media bottom sheet] Improve design, and hide Share and Download when rendered from the MediaViewer.
Closes #6907
2026-06-02 15:22:04 +02:00
Benoit Marty 0a1ef5d121 [Media viewer] Increase topAppBarHeight so that text and PDF files are not rendered below the top app bar. 2026-06-02 10:48:11 +02:00
Benoit Marty 97135272ec [Media viewer] Improve rendering of files
Closes #6899
Closes #6908
2026-06-02 10:22:34 +02:00
Benoit Marty b68c78526f Use secondary color (default) for leading icons.
Fixes #6910
2026-06-01 15:49:53 +02:00
Benoit Marty c409fc2c83 Fix other issues detekted. 2026-05-28 09:54:02 +02:00
Benoit Marty 1f3d848c79 Image edition before sending: crop and rotate. (#6842)
* Add crop and rotate editing before sending images (#6363)

* feat(messages): add crop and rotate before image upload

* Update screenshots

* chore: trigger CI after screenshot update

* fix: resolve detekt violations in image editor and media viewer modules

* fix: require explicit edits param, use plurals for rotation a11y, remove redundant @Inject

* fix: require explicit edits param, use plurals for rotation a11y, remove redundant @Inject

* fix: use semantically correct RotateRight icon for image rotation action

* Update screenshots

* chore: trigger CI after screenshot update

---------

Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Benoit Marty <benoitm@element.io>

* Update design and UX

Update and add tests
Improve preview

* Update screenshots

* For quality issue and improve preview

* Update screenshots

* Remove default value of data class.

* Rename file.

* Fix tests.

* Allow detecting touch events outside the image by applying the drag detection to the parent node and offsetting the touch events

* Improve touch detection.

* Update screenshots

* Remove useless line.

---------

Co-authored-by: Gianluca Iavicoli <gianluca.iavicoli04@gmail.com>
Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-05-26 10:07:05 +02:00
ElementBot 0aaa80cbdc Sync Strings from Localazy (#6856)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-05-26 08:05:07 +00:00
Gianluca Iavicoli bcad1f9dce Add crop and rotate editing before sending images (#6363)
* feat(messages): add crop and rotate before image upload

* Update screenshots

* chore: trigger CI after screenshot update

* fix: resolve detekt violations in image editor and media viewer modules

* fix: require explicit edits param, use plurals for rotation a11y, remove redundant @Inject

* fix: require explicit edits param, use plurals for rotation a11y, remove redundant @Inject

* fix: use semantically correct RotateRight icon for image rotation action

* Update screenshots

* chore: trigger CI after screenshot update

---------

Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Benoit Marty <benoitm@element.io>
2026-05-21 15:18:40 +02:00
Benoit Marty c3a4d64ec6 Merge pull request #6827 from element-hq/feature/bma/a11y/roomNameHeading
[a11y] Improve accessibility of screen headers.
2026-05-21 09:00:33 +02:00
Benoit Marty 44df2d2c17 [a11y] Improve accessibility of media controller 2026-05-20 17:23:30 +02:00
Benoit Marty 4641ae666e [a11y] Improve accessibility of media controller 2026-05-20 17:04:24 +02:00
Benoit Marty bd01b27517 [a11y] Ensure that video overlay with controls is never hidden when screen reader is enabled. 2026-05-20 16:21:06 +02:00
Benoit Marty 5b2970f789 [a11y] Improve accessibility of screen headers. 2026-05-20 15:49:18 +02:00
Jorge Martin Espinosa 42c141109f Fix media viewer flickering (#6800)
* Fix media viewer flickering

This was caused by the data being loaded triggering an index update that got out of sync with the displayed items, and for an instant, the pager index pointed to the wrong data until it was refreshed

* Reuse the same 'displayer' function for both forwards and backwards pagination

* Make `dataFlow` a property so we don't create a new instance every time we access it

* Remove `pageDataComparator` as it prevented new items from being loaded when a pagination returned no valid items to display but has more items to load

Make sure we modify the current index when loading new data only if it was pointing to the input event id.

* Fix `MediaViewerDataSource` overriding the provided timestamp for `Loading` items

Test emitting different loading items from the data source results in the state displaying the different items, so they will trigger a new pagination attempt

* Add regression test to check loading -> error -> loading states will still trigger 2 separate `LoadMore` events
2026-05-20 11:32:32 +02:00
Benoit Marty 07668502fa Merge pull request #6798 from element-hq/sync-localazy
Sync Strings
2026-05-18 18:45:27 +02:00
Jorge Martin Espinosa 2954174c56 Only load full media on media viewer when it's the visible item (#6794)
* Only load full media on media viewer when it's the visible item

* Allow cancelling ongoing media loading if scrolling fast
2026-05-18 10:29:14 +02:00
cizra e6c3a8ff1d Add MIDI playback (#6770)
* Add MIDI playback

* Implement PR suggestions
2026-05-18 10:06:47 +02:00
bmarty dcc67f9fc6 Sync Strings from Localazy 2026-05-18 00:57:56 +00:00
Valere 6bc8cd84e4 fixup test compilation 2026-05-11 16:54:30 +02:00
ElementBot 0c657c258a Sync Strings from Localazy (#6761)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-05-11 09:37:59 +02:00
bxdxnn 071d98c66b Render media captions formatting in the media viewer (#6729)
* Render media captions formatting in the media viewer

* Update screenshots

* Trigger actions

* Remove unused imports and reformat code

---------

Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-05-08 16:30:32 +02:00
Benoit Marty 2a694f6dfd Create PreviewData with sample of UGC used for preview.
Fix preview issue where username was used for room/avatar name.
2026-05-06 17:45:50 +02:00
bxdxnn 28e1062eed Reimplement "Natural media viewer swiping order" (#6715) 2026-05-05 16:02:52 +02:00
Benoit Marty 26fe5b6492 Merge pull request #6650 from element-hq/feature/bma/a11yFixes
[a11y] Fix a set of issues
2026-05-04 11:50:15 +02:00