Commit graph

85 commits

Author SHA1 Message Date
Benoit Marty
32996e421a Add name to call argument. 2024-03-08 17:30:32 +01:00
Benoit Marty
600557fd53 Remove unused val. 2024-02-21 18:30:08 +01:00
Benoit Marty
3cbbde7c3e Add first tests for ShowLocationView 2024-02-19 13:36:08 +01:00
Benoit Marty
367e4bdbda Introduce fun aShowLocationState to reduce boilerplate code. 2024-02-19 13:35:24 +01:00
Jorge Martin Espinosa
b69cb8175a
Update Compound to v0.0.5 and update icons (#2380)
Update Compound to `v0.0.5`:

- Make sure we fix all the breaking changes.
- Update some icons to use the compound version instead.
-Replace icons with their Compound counterparts when possible.
- Clean up unused icons.
- Fix issues with incorrect icons or sizes being used after replacing the temporary icons with the Compound ones.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-02-12 16:41:58 +00: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
Benoit Marty
dd4aa681c6 Remove now useless ExperimentalLayoutApi opt in 2023-12-28 12:41:02 +01:00
Benoit Marty
ab8e4f1422 Add Konsist test to use isTrue() instead of isEqualTo(true), and fix existing issues. 2023-12-04 15:23:36 +01:00
Benoit Marty
b2d9b41946 Add Konsist test to use isFalse() instead of isEqualTo(false), and fix existing issues. 2023-12-04 15:21:50 +01:00
Benoit Marty
fa590202c3 Add Konsist test to check that assertThat is imported, and fix existing issues. 2023-12-04 15:18:01 +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
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
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
Benoit Marty
5de8841d96 Upgrade lint to version 8.3.0-alpha11 and suppress false positive. 2023-11-06 16:03:16 +01:00
jonnyandrew
dab5e0d0ca
Add analytics for voice messages (#1706) 2023-11-02 09:32:22 +00: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
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
Benoit Marty
3c41158558 Use existing BooleanProvider 2023-10-12 15:03:50 +02:00
Benoit Marty
d55df22db2 Konsist: add test Data class state MUST not have default value, and fix existing issues 2023-10-10 17:31:04 +02:00
Benoit Marty
702c137ead Replace mutableStateOf by mutableIntStateOf and mutableFloatStateOf. Use intValue and floatValue to avoid unboxing. 2023-09-26 18:07:53 +02:00
Benoit Marty
0e4c146e87 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
48fd833f8b More cleanup 2023-09-20 17:32:32 +02:00
Benoit Marty
d531e71cd8 Migrate other icons to compound icons. 2023-09-20 16:44:59 +02:00
Benoit Marty
2819448cd4 Use DayNightPreview 2023-09-19 11:49:12 +02:00
Marco Romano
7fdd83bf91 GRemove the @JvmField annotation whenever using WarmUpRule. 2023-09-13 15:19:26 +02:00
Marco Romano
00d21e24e5
Update analytics sdk to v0.8.0 (#1284)
Integrates a few breaking changes introducing a `messageType` Composer prop:
- Sends `messageType` = Text by default in composer.
- Refactors existing location analytics to send the appropriate `messageType`.
2023-09-12 14:01:33 +02:00
jonnyandrew
9e5b46200b
Reduce test flakiness by warming up molecule tests (#1226) 2023-09-06 10:08:21 +00:00
Benoit Marty
5f7c1e9545 Move module features.analytics.test to services.analytics.test. FakeAnalyticsService was not implemented at the correct location. 2023-08-28 14:31:36 +02:00
Benoit Marty
7083abcf09 migrate object to data object (#1135) 2023-08-24 09:32:44 +02:00
Marco Romano
d5c5947ff9 Fix detekt 2023-08-18 15:55:41 +02:00
Marco Romano
e66c362fad Add missing tests 2023-08-18 15:55:41 +02:00
Marco Romano
7a96bb7047 Fix wrong packages after refactor 2023-08-18 15:55:41 +02:00
Marco Romano
4ee082ba48 Remove redundant screenshots 2023-08-18 15:55:41 +02:00
Marco Romano
c2e8dac96a Add location dialogs to show location. Always show FAB. 2023-08-18 15:55:41 +02:00
Marco Romano
a429195cbc Move AndroidLocationActions to impl package 2023-08-18 15:55:41 +02:00
Marco Romano
99ad1c231a Add permission request flow to ShowLocation feature too.
TODO:
- Presenter Tests
- Add Dialogs in View
2023-08-18 15:55:41 +02:00
Benoit Marty
a3ae891e51 Fix issue detected by detekt 2023-08-16 15:24:18 +02:00
Benoit Marty
6aa5239189 Enable detekt rule PreviewPublic and fix existing issues. 2023-07-26 10:08:39 +02:00
Benoit Marty
1a1d4c2957 Fix code quality check failures after new rules from #935 has been merged on develop. 2023-07-21 16:04:55 +02:00
Benoit Marty
b20448bf08
Merge pull request #935 from vector-im/feature/bma/noWarnings
Code quality: warnings are errors and enable more Detekt rules.
2023-07-21 15:52:05 +02:00
Marco Romano
57d04e487c
Static images improvements (#933)
1. On devices less than xhdpi request a 1x image from MapTiler (such devices are generally old, slower and with little memory so avoiding to get the 2x image only to have to shrink it later could help).
2. Coerce too big width/height combos within the API limits keeping the aspect ratio (this will allow requests on big horizontal displays to succeed).
3. Don't crash when given weird width/height combos (i.e. zero or negative).
4. Introduce interfaces to hide this whole logic and make it easier for forks to implement their own.

Related to:
- https://github.com/vector-im/element-meta/issues/1678
2023-07-21 13:37:08 +00:00
Benoit Marty
5e2e03f054
Merge branch 'develop' into feature/bma/noWarnings 2023-07-21 12:17:50 +02:00
Benoit Marty
c75eabbcb0 Enable detekt rules UnnecessaryParentheses and cleanup the code. 2023-07-20 18:08:08 +02:00
Benoit Marty
2928073e22 Enable detekt rules UnusedImports and cleanup the code. 2023-07-20 18:00:23 +02:00
Marco Romano
d964650804
Use correct share my location icon in button (#936)
As per newer design specs.

Related to:
- https://github.com/vector-im/element-meta/issues/1678
2023-07-20 13:59:06 +00:00
Marco Romano
c746981000
Add screenshots with ~1.5 lines long desc to expanded location view (#923)
This will help in catching alignment regressions.

Related to:
- https://github.com/vector-im/element-meta/issues/1678
2023-07-20 13:42:35 +00:00
Marco Romano
e8e4542a75
Extract maptiler's map ids (#926)
Maptiler custom map ids are only useable by the account that create them. So if we hardcode them forkers won't be able to use the maps even if the bring in their own api key (because they can't access our maps with their api key).

Requires to set our map ids in `local.properties` for local development:
```
services.maptiler.lightMapId=9bc819c8-e627-474a-a348-ec144fe3d810
services.maptiler.darkMapId=dea61faf-292b-4774-9660-58fcef89a7f3
```
2023-07-20 14:29:06 +02:00
Marco Romano
f7e7339777
Correct location event body (#930)
- Now sending the correct body format as agreed with design. This won't be show in EX clients though.

Related to:
- https://github.com/vector-im/element-meta/issues/1682
2023-07-20 10:16:40 +00:00
Marco Romano
e448bbb92d
maplibre-compose allow customisation of location dot style (#929)
- And style it according to our designs.

Related to:
- https://github.com/vector-im/element-meta/issues/1682
2023-07-20 12:09:40 +02:00