Commit graph

72 commits

Author SHA1 Message Date
renovate[bot]
59f8641973
Update wysiwyg to v2.20.0 (#1921)
* Update wysiwyg to v2.20.0

* Workaround line height for composer, remove unused test code.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2023-11-29 16:04:40 +01:00
Jorge Martin Espinosa
087d2728d5
Extract compound tokens and theming to compound-android library (#1888)
* Replace tokens & icons with the external Compound ones

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-27 10:30:07 +01:00
Benoit Marty
05ba424e75
Merge pull request #1862 from vector-im/feature/bma/moreTests
Remove lambda default value
2023-11-24 11:00:34 +01:00
Benoit Marty
68c4f1e6bc
Merge pull request #1845 from vector-im/feature/bma/sendingStateA11y
Content description: add for sending state and fix other issues.
2023-11-22 17:51:48 +01:00
Benoit Marty
ae0c3edd24 Remove default value for lambda.
We enforce a value to be provided and it's better for code coverage.
2023-11-22 17:28:23 +01:00
Jorge Martin Espinosa
97e9528e13
Add intentional mentions (#1843)
* Add intentional mentions
2023-11-21 17:34:00 +01:00
Benoit Marty
164269ef76 No need to have a SemanticColors parameter. 2023-11-21 16:53:09 +01:00
Benoit Marty
a8e0d1e66d Fix compilation issue 2023-11-21 16:51:50 +01:00
Benoit Marty
67ed385e45 Prevent usage of hard-coded string for contentDescription, and fix existing issues. 2023-11-21 15:38:21 +01:00
Jorge Martin Espinosa
a8fbb882f2
Integrate mentions in the composer (#1799)
* Integrate mentions in the composer:

    - Add `MentionSpanProvider`.
    - Add custom colors needed for mentions.
    - Use the span provider to render mentions in the composer.
    - Allow selecting users from the mentions suggestions to insert a mention.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-20 18:14:02 +01:00
Jorge Martin Espinosa
a5bad53c62
Iterate design on several screens: update icons, replace PreferenceTexts (#1771)
- Batch import new icons from the design team.
- Rename _september icons since they're just extra icons that need to be integrated in Compound in the future, and it should be ok if we don't distinguish between ic_september_*, ic_november_* etc., so all icons are now simply ic_* in the designsystem module.
- Create a new CompoundIconListPreviewProvider to add chunked lists of icons for previews. Add an exception for it to Konsist.
- Move some icons to use Compound icons.
- Remove most PreferenceText usages, use ListItem instead.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-15 10:52:37 +01:00
jonnyandrew
0b1d41e861
Update voice message recording button behaviour (#1784)
Changes recording button behaviour so that
- tapping the record button starts a recording and displays the stop button
- tapping the stop button stops the recording
- tapping the delete button cancels the recording
- 'hold to record' tooltip is removed


---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-14 14:05:59 +00:00
jonnyandrew
14be887cac
Enable seeking a recorded voice message (#1758) 2023-11-10 09:18:01 +00:00
Benoit Marty
035609d74a Add preview for AttachmentThumbnail and fix issue rendering for AttachmentThumbnailType.Location for coherency. 2023-11-08 16:28:07 +01:00
bmarty
2fca8412b2 Sync Strings from Localazy 2023-11-06 08:23:40 +00:00
Benoit Marty
21200df294 Konsist: check that if sealed interface is used in parameter of Composable, it has the @Stable or @Immutable annotation 2023-11-03 15:19:55 +01:00
Benoit Marty
3092ca23f0 Konsist: check if sealed class could be sealed interface and fix existing issues. 2023-11-03 15:19:55 +01:00
jonnyandrew
ddc1e1d0cc
Display duration of recorded voice message (#1733)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-03 12:59:36 +00:00
jonnyandrew
5080df3262
Add voice message 'hold to record' tooltip (#1710)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-02 14:29:05 +00:00
Benoit Marty
d640b04728
Merge pull request #1691 from vector-im/jonny/fix-composer-scaling
Fix scaling of composer UI
2023-11-02 14:40:52 +01:00
jonnyandrew
83a6395688
Add time to voice message composer UI (#1720)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-02 12:10:36 +00:00
jonnyandrew
ef94421801
Fix scaling of composer UI 2023-10-30 13:23:01 +00:00
jonnyandrew
fa66ffc06d
Improve composer UI scaling (#1689) 2023-10-30 12:41:05 +00:00
jonnyandrew
18ca1da1b5
Add haptic feedback to voice message record button (#1686) 2023-10-30 12:01:39 +00:00
Marco Romano
7651cf1b33
Voice message button: Show proper disabled color. (#1682)
Also changes a bit our own IconButton api to allow to mirror material's and allow color customization.
2023-10-30 10:51:22 +00:00
Marco Romano
a51fdf9fb8
Blink red dot while recording voice message (#1677)
Story: https://github.com/vector-im/element-meta/issues/2084
2023-10-27 21:12:43 +00:00
jonnyandrew
8121d1a6de
Show voice message preview player progress (#1675)
* Show voice message preview player progress

* Update screenshots

* Fix test

* Some nits over mediaplayer stuff

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: Marco Romano <marcor@element.io>
2023-10-27 20:43:52 +00:00
Marco Romano
f3c4c6218e
Use correct icon tint in voice message preview player (#1672)
Action item from design review.
2023-10-27 16:24:16 +00:00
jonnyandrew
7ebea4acf1
Refactor waveform factory function 2023-10-27 16:05:34 +01: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
David Langley
977c7e265a Fix naming and waveform previews 2023-10-27 13:06:33 +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
David Langley
416aa3b64a FIx height and concurrent exception
- Fix live waveform hight
- Fix concurrent modification exception when sharing levels
- Tidy up width of live waveform
2023-10-27 08:41:08 +01:00
David Langley
1389c9ed24 Simple live waveform implementation. 2023-10-26 23:46:03 +01: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
Marco Romano
3ec62ad58a
Use Float instead of Double for all the level metering logic. (#1645)
This is in preparation of further changes to the way the audio level is computed and to allow recording and sending of the waveform. The main reasoning behind the change is twofold:
1) We don't need the precision of Double in our context (we just need a rough indication of the changes in audio level to successfully draw a level meter or a waveform in our UI).
2) Performance: It is true that on 64 bit CPUs single operations involving Floats or Doubles take the same amount of time (i.e one clock cycle). But there are other aspects here that vouch in favor of Floats:
	- A float takes half the space in memory compared to a double, so when storing long lists of them this can add up.
	- On Android O and greater the ART runtime can "vectorize" certain operations on lists and make use of the CPU's SIMD registers which are generally 128 bits. So by using floats 4 of them can fit and be computed at the same time whilst with doubles only 2 will fit halving the throughput.

References:
- https://source.android.com/docs/core/runtime/improvements
- https://www.slideshare.net/linaroorg/automatic-vectorization-in-art-android-runtime-sfo17216
2023-10-26 12:55:23 +00: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
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
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
jonnyandrew
7048da2e20
Fix issue where text is cleared when cancelling a reply (#1617) 2023-10-23 08:31:32 +00:00
jonnyandrew
12404fab78
[Voice messages] Add voice recording UI (#1546)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-12 15:17:18 +00:00
jonnyandrew
6e9d19884c
Refactor composer UI components to separate files (#1506)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-10 08:31:36 +00:00
jonnyandrew
53cf82f025
[Rich text editor] Add full screen mode (#1447)
- Add full screen mode for the rich text editor (RTE). When text formatting options are enabled, the editor can be dragged to full screen.
- Remove `ConstraintLayout` from `textcomposer` module, now made much simpler now the RTE supports being called in multiple layouts matrix-org/matrix-rich-text-editor#822

- Part of vector-im/element-meta#1973
- Includes design from #1315
- Fixes #1293 (through new layout)
- Fixes #1394 (through inclusion of matrix-org/matrix-rich-text-editor#824)
- Fixes #1259 (through inclusion of matrix-org/matrix-rich-text-editor#820)

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-09-29 09:11:18 +00:00
bmarty
c72bb92ef2 Sync Strings from Localazy 2023-09-25 00:09:17 +00:00
bmarty
a7ce12d91d Sync Strings from Localazy 2023-09-21 15:51:21 +00:00