Commit Graph

76 Commits

Author SHA1 Message Date
Jorge Martin Espinosa
2efdb3ae45 Centralise the DI code generation logic (#3562)
* Create Anvil extension helper

* Use the helper everywhere
2024-09-30 12:20:28 +00:00
Benoit Marty
62a6e916a6 Migrate license to AGPL - XML files. 2024-09-06 17:43:35 +02:00
Benoit Marty
2b016227e9 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
Benoit Marty
94f38f1af5 Rework FakeMatrixRoom so that it contains only lambdas. (#3229)
* Upgrade lint to 8.7.0-alpha01

* FakeMatrixRoom: lambda everywhere

Fix test compilation issues
2024-07-22 10:39:48 +02:00
Jorge Martin Espinosa
950e502ca6 Improve screenshot testing with ComposablePreviewScanner (#3125)
* Use ComposablePreviewScanner to rework how screenshot testing works
* Add test sharding
* Update screenshots
* Fixes for Element Gallery

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-07-03 13:05:06 +02:00
ganfra
dfae2e50c9 Draft : refactor a bit ComposerMode and formatting management so we don't mess up with draft restoration. 2024-06-25 11:35:22 +02:00
ganfra
71667dc235 Reply : refactor so we can use ReplyToDetails in Composer and Timeline 2024-06-21 12:23:17 +02:00
Benoit Marty
9367f58216 Rename some class from Impl to Default 2024-05-31 09:47:27 +02:00
ganfra
395b3c4806 Merge branch 'develop' into renovate/org.maplibre.gl-android-sdk-11.x 2024-05-29 15:43:25 +02:00
Benoit Marty
87689d787e Lambda parameters in a composable function should be in present tense, not past tense.
https://mrmans0n.github.io/compose-rules/rules/#naming-parameters-properly
2024-05-29 12:18:23 +02:00
Benoit Marty
db21cd439e Rename class (code quality) 2024-05-23 14:38:49 +02:00
ganfra
526c33df17 maplibre : remove all mapbox references and update plugin to be compatible. 2024-05-21 16:12:19 +02:00
Benoit Marty
67e0ca9202 Add name to call argument. 2024-03-08 17:30:32 +01:00
Benoit Marty
b6aa44d374 Remove unused val. 2024-02-21 18:30:08 +01:00
Benoit Marty
b48aa45d51 Add first tests for ShowLocationView 2024-02-19 13:36:08 +01:00
Benoit Marty
9c599a298a Introduce fun aShowLocationState to reduce boilerplate code. 2024-02-19 13:35:24 +01:00
Jorge Martin Espinosa
973c57d401 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
378692f743 Fix moar ktlint issues 2024-01-11 10:02:10 +01:00
renovate[bot]
7e9cda3aa9 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
d9fb5ce007 Remove now useless ExperimentalLayoutApi opt in 2023-12-28 12:41:02 +01:00
Benoit Marty
7c58a843dc Add Konsist test to use isTrue() instead of isEqualTo(true), and fix existing issues. 2023-12-04 15:23:36 +01:00
Benoit Marty
65924eac6b Add Konsist test to use isFalse() instead of isEqualTo(false), and fix existing issues. 2023-12-04 15:21:50 +01:00
Benoit Marty
45883975c4 Add Konsist test to check that assertThat is imported, and fix existing issues. 2023-12-04 15:18:01 +01:00
Jorge Martin Espinosa
a8b85fb4e6 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
4ae0790cc1 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
14cf2b0440 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
e376feba22 Add analytics for voice messages (#1706) 2023-11-02 09:32:22 +00: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
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
Benoit Marty
de31f8a73a 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
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
54ca7c1ea5 More cleanup 2023-09-20 17:32:32 +02:00
Benoit Marty
d6ea21da22 Migrate other icons to compound icons. 2023-09-20 16:44:59 +02:00
Benoit Marty
e326e49e4c Use DayNightPreview 2023-09-19 11:49:12 +02:00
Marco Romano
b860bd30bd GRemove the @JvmField annotation whenever using WarmUpRule. 2023-09-13 15:19:26 +02:00
Marco Romano
5ddaf0547f 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
301e49c3a3 Reduce test flakiness by warming up molecule tests (#1226) 2023-09-06 10:08:21 +00:00
Benoit Marty
bcede44407 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
52853101d9 migrate object to data object (#1135) 2023-08-24 09:32:44 +02:00
Marco Romano
3609d419c4 Fix detekt 2023-08-18 15:55:41 +02:00
Marco Romano
d1ca452326 Add missing tests 2023-08-18 15:55:41 +02:00
Marco Romano
ac32d724c1 Fix wrong packages after refactor 2023-08-18 15:55:41 +02:00
Marco Romano
7c378dbdd5 Remove redundant screenshots 2023-08-18 15:55:41 +02:00
Marco Romano
314c0499a5 Add location dialogs to show location. Always show FAB. 2023-08-18 15:55:41 +02:00
Marco Romano
917965a9b6 Move AndroidLocationActions to impl package 2023-08-18 15:55:41 +02:00
Marco Romano
675dd4b109 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
996574f2c6 Enable detekt rule PreviewPublic and fix existing issues. 2023-07-26 10:08:39 +02:00
Marco Romano
71676c3faf 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
Marco Romano
ffaf24751a 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
d5a93a50e0 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