Commit graph

532 commits

Author SHA1 Message Date
David Langley
52f0057d5a Merge branch 'langleyd/live_waveform' of https://github.com/vector-im/element-x-android into langleyd/live_waveform 2023-10-27 13:55:45 +01:00
David Langley
a4df8f80cc Merge branch 'develop' of https://github.com/vector-im/element-x-android into langleyd/live_waveform 2023-10-27 13:54:18 +01:00
ElementBot
cb5b463c9b Update screenshots 2023-10-27 12:23:14 +00:00
Marco Romano
a6e4644cfa
Add missing screenshots in TimelineView (#1660)
Add audio, voice  and poll screenshots to TimelineView which were missing.
2023-10-27 12:18:28 +00:00
David Langley
a64003355a Merge branch 'develop' of https://github.com/vector-im/element-x-android into langleyd/live_waveform 2023-10-27 13:10:32 +01:00
jonnyandrew
9510d43289
Add waveform to voice message preview UI (#1661)
* Add waveform to preview UI

* Update screenshots

* Make random waveform function deterministic

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-27 11:33:35 +00:00
David Langley
37f8195956 Merge branch 'develop' of https://github.com/vector-im/element-x-android into langleyd/live_waveform 2023-10-27 12:28:46 +01:00
Jorge Martin Espinosa
44de6adb86
Initial support for member suggestions (#1631)
* Initial support for member suggestion (search and UI)

* Add custom `BottomSheetScaffold` implementation to workaround several scrolling bugs

* Start searching as soon as `@` is typed, add UI following initial designs

* Extract suggestion processing code

* Extract component, add previews, fix tests

* Add tests

* Add exception from kover to the forked bottom sheet code

* Add a feature flag for mentions

- Extract composer & mention suggestions to their composable.
- Extract mentions suggestions processing to its own class.
- Add `MatrixRoom.canTriggerRoomNotification` function.
- Update strings and conditions for displaying the `@room` mention.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-27 10:26:40 +00:00
Marco Romano
b2a61f2ed3
Show correct UI when replying to a voice message (#1658)
Shows voice messages in the room summary.
Shows voice messages in the reply context menu and composer.
Show replies to voice messages in the timeline. 

(before this PR voice messages were shown the same as audio messages)

Story: https://github.com/vector-im/element-meta/issues/2106
2023-10-27 11:30:57 +02:00
Benoit Marty
bf905dd79b
Merge pull request #1651 from vector-im/feature/bma/uiUpdate
Preparatory work for SecureBackup: UI update
2023-10-27 11:03:29 +02:00
ElementBot
1d1b97babd Update screenshots 2023-10-27 08:51:51 +00:00
Marco Romano
0457e5915c
Convert mx waveform to floats as early as possible in the chain (#1652)
This way we're sure that internally we always deal with [0;1] float samples. the [0;1024] int range is used only at the rust sdk boundary.
2023-10-26 16:58:00 +00:00
ElementBot
4a7dc3feda Update screenshots 2023-10-26 17:40:51 +02:00
jonnyandrew
a67410f573
Add voice message preview player (#1646)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-26 15:33:58 +00:00
jonnyandrew
acd7aef6be
Move waveform UI to design system library (#1649) 2023-10-26 15:15:42 +00:00
ganfra
ec9b6ba62f
Merge pull request #1642 from vector-im/feature/fga/pin_settings
PIN : settings and branch flow
2023-10-26 16:40:38 +02:00
Jorge Martin Espinosa
030e86f56b
Update the chat screen UI using RoomInfo. (#1640)
* Update the chat screen UI using `RoomInfo`.

This is specially useful for getting live values for `hasRoomCall`.

* Ensure the first `MatrixRoomInfo` is emitted ASAP

* Try excluding `*Present$present$*` inner functions from kover as separate entities

* Update strings

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-26 14:27:42 +00:00
ElementBot
6d5ce88153 Update screenshots 2023-10-26 13:45:59 +00:00
ElementBot
c96dc310c8 Update screenshots 2023-10-26 09:32:15 +00:00
ElementBot
762e091b06 Update screenshots 2023-10-26 08:26:46 +00:00
Marco Romano
9cf17dfa12
Voice message bubble design improvements (#1637)
- Fixes color and size of both text and icons.
2023-10-25 17:33:50 +02:00
David Langley
ef0110d9d7
Merge pull request #1610 from vector-im/dla/feature/custom_room_notification_settings_list
Custom room notification settings list
2023-10-24 23:02:16 +01:00
Marco Romano
6e66c989f4
Receive and play a voice message (#1503)
## Type of change

- [x] Feature
- [ ] Bugfix
- [ ] Technical
- [ ] Other :

## Content

This PR consists of several macro-blocks separated by path/package:
- `messages.impl.mediaplayer` : Global (room-wide) media player, now used only for voice messages but could be used for all media within EX in the future. It is backed by media3's exoplayer. Currently not unit-tested because mocking exoplayer is not trivial.
- `messages.impl.voicemessages.play` : Business logic of a timeline voice message. This is all the logic that manages the voice message bubble.
- `messages.impl.timeline.model` & `messages.impl.timeline.factories`: Timeline code that takes care of creating the `content` object for voice messages.
-  `messages.impl.timeline.components` : The actual View composable that shows the UI inside a voice message bubble.

All the rest is just small related changes that must be done here and there in existing code.

From a high level perspective this is how it works:
- Voice messages are unlike other message bubbles because they carry state (i.e. playing, downloading...) so they have a Presenter managing this state.
- Media content (i.e. the ogg file) of a voice message is downloaded from the rust SDK on first play then stored in a voice messages cache (see the `VoiceMessageCache` class, it is just a subdirectory in the app's cacheDir which is indexed by the matrix content uri). All further play attempts are done from the cache without hitting the rust SDK anymore.
- Playback of the ogg file is handled with the `VoiceMessagePlayer` class which is basically a "view" of the global `MediaPlayer` that allow the voice message to only see the media player state belonging to its media content. 
- Drawing of the waveform is done with an OSS library wrapped in the `WaveformProgressIndicator` composable.

Known issues:
 - The waveform has no position slider.
 - The waveform (and together with it the whole message bubble) is taller than the actual Figma design.
 - Swipe to reply for voice messages is disabled to avoid conflict with the audio scrubbing gesture (to reply to a voice message you have to use the long press menu).
 - The loading indicator is always shown (there is no delay).
 - Voice messages don't stop playing when redacted.

## Motivation and context

https://github.com/vector-im/element-meta/issues/2083

## Screenshots / GIFs

Provided by Screenshot tests in the PR itself.
2023-10-24 21:47:51 +00:00
ElementBot
f5999a5a35 Update screenshots 2023-10-24 21:31:36 +00:00
David Langley
6fa73963c1
Merge branch 'develop' into dla/feature/custom_room_notification_settings_list 2023-10-24 22:18:38 +01:00
jonnyandrew
8c7a0c0e0a
Allow deleting a recorded voice message (#1635)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-24 21:02:19 +00:00
ElementBot
21f325686f Update screenshots 2023-10-24 16:35:20 +00:00
David Langley
4784235f8d
Merge branch 'develop' into dla/feature/custom_room_notification_settings_list 2023-10-24 17:20:15 +01:00
ElementBot
02982b6626 Update screenshots 2023-10-24 17:17:15 +02:00
jonnyandrew
f1b142f002
Add voice message recording duration indicator and limit (#1628)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-24 11:44:53 +00:00
jonnyandrew
8c0d9cc6a0
Add progress indicator for sending voice messages (#1618)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-24 08:36:42 +00:00
jonnyandrew
b476654489
Record and send voice messages (#1596)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-23 17:28:00 +00:00
ganfra
005e5cc1a1
Merge pull request #1624 from vector-im/feature/fga/pin_auth_ui
PIN : unlock screen ui
2023-10-23 16:35:22 +02:00
ElementBot
4bcb17f09f Update screenshots 2023-10-23 13:49:14 +00:00
Benoit Marty
6a3c42f189 Konsist: add test to ensure that functions with @PreviewsDayNight are internal, and fix existing issues. 2023-10-23 12:23:27 +02:00
Benoit Marty
8ca42d4cfc Konsist: add test to ensure that functions with @PreviewsDayNight contain ElementTheme composable, and fix existing issues. 2023-10-23 12:23:27 +02:00
ElementBot
c8dc364147
Sync Strings (#1623)
* Sync Strings from Localazy

* Fix strings

* Update screenshots

---------

Co-authored-by: bmarty <bmarty@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2023-10-23 08:20:49 +00:00
ElementBot
0e00797e67 Update screenshots 2023-10-23 08:15:26 +00:00
ElementBot
ea2c332e52 Update screenshots 2023-10-20 20:30:14 +00:00
ElementBot
4327689234 Update screenshots 2023-10-20 09:12:23 +00:00
ElementBot
a0cde93b1d Update screenshots 2023-10-19 20:39:07 +00:00
ganfra
20c2ee9e3a Merge branch 'develop' into feature/fga/pin_create_ui 2023-10-19 22:26:21 +02:00
ElementBot
aa78255b4b Update screenshots 2023-10-19 15:47:25 +00:00
Jorge Martin Espinosa
46f78ef700
Integrate Element Call with widget API (#1581)
* Integrate Element Call with widget API.

- Add `appconfig` module and extract constants that can be overridden in forks there.
- Add an Element Call feature flag, disabled by default.
- Refactor the whole `ElementCallActivity`, move most logic out of it.
- Integrate with the Rust Widget Driver API (note the Rust SDK version used in this PR lacks some needed changes to make the calls actually work).
- Handle calls differently based on `CallType`.
- Add UI to create/join a call.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-19 15:38:43 +00:00
ElementBot
0b295b7f2a Update screenshots 2023-10-19 15:24:30 +00:00
ganfra
e88a5fc858 Pin create: add test for presenter 2023-10-19 15:45:11 +02:00
ElementBot
3a4d32f79d Update screenshots 2023-10-19 10:47:03 +00:00
ganfra
00e885fa9f
Merge pull request #1592 from vector-im/feature/fga/setup_crypto_for_pin
Feature/fga/setup crypto for pin
2023-10-18 17:21:47 +02:00
ElementBot
c635281954 Update screenshots 2023-10-18 13:22:53 +00:00
Jorge Martin Espinosa
e5a8fd9635
Make sure Konsist tests always run (#1590)
* Make sure Konsist tests always run

* Update tests/konsist/build.gradle.kts

Co-authored-by: Benoit Marty <benoit@matrix.org>

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2023-10-18 09:41:47 +00:00