Commit Graph

50 Commits

Author SHA1 Message Date
jonnyandrew
59a4d34a1a Improve composer UI scaling (#1689) 2023-10-30 12:41:05 +00:00
jonnyandrew
b1fffdc9e9 Add haptic feedback to voice message record button (#1686) 2023-10-30 12:01:39 +00:00
Marco Romano
10ff9742e1 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
ec198ce2e9 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
4dfe8121b4 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
a33a36cb35 Use correct icon tint in voice message preview player (#1672)
Action item from design review.
2023-10-27 16:24:16 +00:00
jonnyandrew
fca94692f6 Refactor waveform factory function 2023-10-27 16:05:34 +01:00
David Langley
c79d24d943 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
34dda1b568 Fix naming and waveform previews 2023-10-27 13:06:33 +01:00
jonnyandrew
38de57bb02 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
ad81e2898c 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
0bd9c78836 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
d20ae3f6b9 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
510b1f63b9 Simple live waveform implementation. 2023-10-26 23:46:03 +01:00
jonnyandrew
517b422992 Add voice message preview player (#1646)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-26 15:33:58 +00:00
Marco Romano
4d9a3bddaf 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
98b75424a8 Allow deleting a recorded voice message (#1635)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-24 21:02:19 +00:00
jonnyandrew
9046ac4c8a 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
bdc52332bb 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
5c582bba1b Record and send voice messages (#1596)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-23 17:28:00 +00:00
ganfra
40f677192a 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
577527902f 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
3a39e747fd Fix issue where text is cleared when cancelling a reply (#1617) 2023-10-23 08:31:32 +00:00
jonnyandrew
ffa6c43503 [Voice messages] Add voice recording UI (#1546)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-12 15:17:18 +00:00
jonnyandrew
7e91e7824e 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
70dfbd7c31 [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
e9a7c7bbaf Sync Strings from Localazy 2023-09-25 00:09:17 +00:00
bmarty
4077c5c834 Sync Strings from Localazy 2023-09-21 15:51:21 +00:00
Benoit Marty
d2ca528679 Detekt: Rename DayNightPreviews to PreviewsDayNight to follow naming convention.
MultiPreview annotations should start with `Previews` as prefix
2023-09-21 08:30:36 +02:00
Benoit Marty
c15e47d571 Merge pull request #1392 from vector-im/feature/bma/iterateOnIcons
Iterate on icons
2023-09-20 23:20:28 +02:00
Benoit Marty
f0e8c0b32d Add start padding to the send icon to make it visually centered. 2023-09-20 18:47:29 +02:00
Benoit Marty
d6ea21da22 Migrate other icons to compound icons. 2023-09-20 16:44:59 +02:00
Benoit Marty
27bd4cd9c0 Remove unused icons 2023-09-20 16:44:59 +02:00
Benoit Marty
caa0ce0c0a Iterate on icons (#1320) 2023-09-20 16:44:59 +02:00
Benoit Marty
8fedc40008 Remove VectorIcons object, inline the values. 2023-09-20 16:44:59 +02:00
jonnyandrew
2757b5b13d [Rich text editor] Update code and links style (#1362) 2023-09-19 15:40:59 +00:00
jonnyandrew
d291622eea [Rich text editor] Add link functionality to rich text editor (#1309)
* Add link functionality to rich text editor
* Add 'list dialog' component compound design library
* Add 'text field list item' component to compound design library
2023-09-19 11:20:07 +00:00
bmarty
6e5e538724 Sync Strings from Localazy 2023-09-18 00:09:19 +00:00
jonnyandrew
7ba73aed2c [Rich text editor] Ensure keyboard opens for reply and text formatting modes (#1337) 2023-09-16 07:40:56 +00:00
jonnyandrew
6ca4317ca5 Merge branch 'develop' into jonny/fix-placeholder-overflow 2023-09-15 11:57:11 +01:00
jonnyandrew
36119106a9 [Rich text editor] Update design (#1332)
* Fix composer height and padding

* Update plus and cancel icons with design system icons

* Update border so that it is always visible

* Update placeholder color

* Update send and tick icons

* Update design of formatting buttons

* Update RTE icons

* Reduce bottom padding

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-09-15 10:16:30 +00:00
jonnyandrew
743a1e654b Fix placeholder spilling onto multiple lines 2023-09-15 11:11:43 +01:00
ganfra
b60b481ee0 Merge branch 'develop' into feature/fga/timeline_thread_decoration 2023-09-14 16:57:20 +02:00
ganfra
455d39c629 Sync Strings from Localazy 2023-09-14 14:38:49 +00:00
ganfra
62cabff39a Thread decoration: update preview with new changes 2023-09-13 16:36:35 +02:00
ganfra
c0e518e050 Thread decoration: add "Reply in thread" context 2023-09-13 16:00:44 +02:00
Benoit Marty
6702dc6895 Maestro: ensure the Rich Text Editor can be clicked by Maestro.
We cannot click on the hint "Message" anymore, since it's now a separate Text.
2023-09-13 14:33:32 +02:00
jonnyandrew
d5b01ac0b4 [Rich text editor] Add feature flag for rich text editor (#1289) 2023-09-13 08:17:02 +00:00
jonnyandrew
a05f4d8999 [Rich text editor] Add formatting menu (#1261)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-09-08 16:23:15 +00:00
jonnyandrew
11c1fca92e [Rich text editor] Integrate rich text editor library (#1172)
* Integrate rich text editor

* Also increase swapfile size in test CI

Fixes issue where screenshot tests are terminated due to lack of CI
resources.

See https://github.com/actions/runner-images/discussions/7188#discussioncomment-6750749

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-09-07 15:21:29 +00:00