Commit Graph

98 Commits

Author SHA1 Message Date
Benoit Marty b104dba845 Remove Modifier parameter in private function when only default value is used.
This will improve the code coverage metrics, and this also fixes a few potential bug, where the Modifier was used several times.
2024-02-08 11:06:06 +01:00
bmarty 03c95555e3 Sync Strings from Localazy 2024-02-05 00:09:59 +00:00
Benoit Marty bfb6b32740 Send typing notification #2240 2024-01-26 16:30:43 +01:00
Benoit Marty eb51b49aef Always use the latest... fix. 2024-01-23 18:13:33 +01:00
Benoit Marty 3ced570b3c Fix detekt issue:
Lambda parameters in a @Composable that are referenced directly inside of restarting effects can cause issues or unpredictable behavior.

If restarting the effect is ok, you can add the reference to this parameter as a key in that effect, so when the parameter changes, a new effect is created.
However, if the effect is not to be restarted, you will need to use `rememberUpdatedState` on the parameter and use its result in the effect.

See https://mrmans0n.github.io/compose-rules/rules/#be-mindful-of-the-arguments-you-use-inside-of-a-restarting-effect for more information. [LambdaParameterInRestartableEffect]
2024-01-23 18:13:33 +01:00
ElementBot 6bc080c279 Sync Strings (#2230)
Co-authored-by: bmarty <bmarty@users.noreply.github.com>
2024-01-15 09:21:04 +01:00
Benoit Marty 5d086ad82d Fix moar ktlint issues 2024-01-11 10:02:10 +01:00
renovate[bot] c8bd362397 Update plugin ktlint to v12.1.0 (#2200)
* Update plugin ktlint to v12.1.0

* Run `./gradlew ktlintFormat` and fix some issues manually.

* Fix other issues reproted by Ktlint

* Limit false positives, KtLint removes unnecessary curly brace in String templates.

* Remove useless Unit

* Minor improvements over ktlint changes

* Restore `AlertDialogContent` behaviour

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-10 16:22:24 +01:00
Jorge Martin Espinosa 13e8e954d3 Improve rendering of voice messages in the timeline in large displays (#2199)
* Improve rendering of voice messages in the timeline in large displays

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-09 18:07:23 +01:00
Benoit Marty b6f88f9792 Merge branch 'develop' into feature/bma/sendImageFromKeyboard 2024-01-08 08:59:00 +01:00
Jorge Martin Espinosa 4f6c7421bd Implement ContentAvoidingLayout for timeline items (#2113)
* Implement `ContentAvoidingLayout` for timeline items

* Truncate long mention pills

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-03 12:32:02 +01:00
Benoit Marty bc6d47b288 Add support for sending images from the keyboard #1977 2023-12-29 15:15:22 +01:00
Jorge Martin Espinosa 7fdba39d6d Disable vector XML rasterisation on API 23 (#2128)
* Disable vector XML rasterisation on API 23

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-12-29 11:41:08 +00:00
Jorge Martín bbc36adb39 Fix release build 2023-12-28 15:20:28 +01:00
Jorge Martín d5c8b62178 Add build script for the RTE library 2023-12-28 12:03:23 +01:00
bmarty e6f4a7364f Sync Strings from Localazy 2023-12-26 09:39:48 +01:00
Benoit Marty 6316dd2c15 Remove unused import and format. 2023-12-20 17:33:49 +01:00
Benoit Marty 9ae521dd0b Use Edit icon from Compound and delete ic_edit_solid 2023-12-20 17:33:49 +01:00
Benoit Marty c0fa56fff4 Fix size trick, the icon has changed. 2023-12-20 17:33:49 +01:00
Benoit Marty 79f52990ff Use CompoundIcon and remove ic_send.xml 2023-12-20 17:33:49 +01:00
Jorge Martin Espinosa 80408a807c Fix mentions font weight and horizontal padding (#2025)
* Fix mentions font weight and horizontal padding

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-12-14 14:15:25 +01:00
Jorge Martin Espinosa 1e86d8279b Use RTE TextView for timeline text messages, add mention pills to messages (#1990)
* Add `formattedBody` to `TimelineItemTextBasedContent`.

This is pre-computed when timeline events are being mapped from the Rust SDK.

* Update `HtmlConverterProvider` styles.

* Improve `MentionSpan` to add missing `@` or `#` if needed

* Replace `HtmlDocument` with the `TextView` based component

* Improve extra padding calculation for timestamp by rounding the float offset result instead of truncating it.

* Remove composer line height workaround

* Use `ElementRichTextEditorStyle` instead of `RichTextEditorDefaults` for the theming

* Use slightly different styles for composer and messages (top/bottom line height discrepancies, mostly).

* Add `formattedBody` to notice and emote events.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-12-13 18:09:53 +01:00
Benoit Marty 39cca2ce09 Sync localazy using fixed script 2023-12-08 19:24:35 +01:00
Benoit Marty 573dc2a7af Ensure user display name is clipped to the Text area (#1950) 2023-12-05 17:20:58 +01:00
Benoit Marty 24d3981261 Run the script again. 2023-12-05 12:25:59 +01:00
bmarty fced91addb Sync Strings from Localazy 2023-12-04 00:09:56 +00:00
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