Commit Graph

122 Commits

Author SHA1 Message Date
Benoit Marty e0255777c0 Enable detekt rules CascadingCallWrapping and fix existing issues. 2023-07-26 11:07:25 +02:00
Benoit Marty 17155a7426 Enable detekt rules SuspendFunSwallowedCancellation and SuspendFunWithCoroutineScopeReceiver. 2023-07-26 10:48:38 +02:00
Benoit Marty bd0031445e Enable detekt rule TooGenericExceptionThrown and fix existing issue. 2023-07-26 10:40:41 +02:00
Benoit Marty 297d77af85 Enable detekt rule InstanceOfCheckForException. 2023-07-26 10:37:44 +02:00
Benoit Marty 7aa448c3bc Enable detekt rule ComplexCondition, LargeClass. 2023-07-26 10:34:39 +02:00
Benoit Marty b5a5118160 Enable detekt rule ThrowingExceptionsWithoutMessageOrCause and fix existing issues. 2023-07-26 10:33:51 +02:00
Benoit Marty 9a6ed8dac6 Enable detekt rule UnnecessaryAbstractClass, LoopWithTooManyJumpStatements, EmptySecondaryConstructor. 2023-07-26 10:23:51 +02:00
Benoit Marty 5ae51095e3 Enable detekt rule ProtectedMemberInFinalClass. 2023-07-26 10:19:25 +02:00
Benoit Marty 73347deaaf Enable detekt rule UseCheckOrError and fix existing issues (and a potential crash on MapboxMap?). 2023-07-26 10:18:28 +02:00
Benoit Marty 3f372e5804 Enable detekt rule ImplicitDefaultLocale and fix existing issue. 2023-07-26 10:11:00 +02:00
Benoit Marty 6aa5239189 Enable detekt rule PreviewPublic and fix existing issues. 2023-07-26 10:08:39 +02:00
Benoit Marty 5eb70215a6 Ensure the release script will exist in case of failure. 2023-07-21 12:51:10 +02:00
Benoit Marty ce22aecbf2 Add a shortcut to ensure that ./gradlew check will prevent having warning in the codebase. We may add more instructions in the future in this file. 2023-07-21 12:50:29 +02:00
Benoit Marty 5e2e03f054 Merge branch 'develop' into feature/bma/noWarnings 2023-07-21 12:17:50 +02:00
Benoit Marty b98d57c9c8 Change how we detect if git flow is init. 2023-07-20 19:43:46 +02:00
Benoit Marty 3e2a516b94 Move download_github_artifacts.py to its own folder. 2023-07-20 19:22:53 +02:00
Benoit Marty 8833bd09d6 Extract git flow init from release script (so that it can be run standalone) and do not use -t which does not seem to be standard. 2023-07-20 19:15:56 +02:00
Benoit Marty 73ae59a3ca Enable more detekt rules 2023-07-20 18:08:37 +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
Benoit Marty 08a7287e8b Remove detekt rules about ViewModels. 2023-07-20 17:53:29 +02:00
Benoit Marty e918d6affd Enable detekt rules TopLevelPropertyNaming and cleanup the code. 2023-07-20 17:52:48 +02:00
Benoit Marty a8ed8b7a59 Enable detekt rules VariableNaming and cleanup the code. 2023-07-20 17:50:23 +02:00
Benoit Marty 86756dbc09 Enable detekt rules UnusedParameter and UnusedPrivateProperty and cleanup the code. 2023-07-20 17:48:56 +02:00
Benoit Marty 24ece8c454 Enable detekt rule UnusedPrivateMember and cleanup the code. 2023-07-20 17:44:14 +02:00
Benoit Marty 3f399ff396 Add release script 2023-07-20 13:27:47 +02:00
Jorge Martin Espinosa 2488432805 Hide encryption history + FTUE flow (#839)
* First attempt at implementing encrypted history banner and removing old UTDs

* Get the right behavior in the timeline

* Implement the designs

* Extract post-processing logic, add tests

* Add encryption banner to timeline screenshots

* Create FTUE feature to handle welcome screen and analytics

* Move classes to their own packages, add tests for `DefaultFtueState`.

* Remove unnecessary private MutableStateFlow

* Move some FTUE related methods and classes back to the `impl` module

* Handle back press at each FTUE step

* Remove unneeded `TestScope` receiver for `createState` in tests.

* Use light & dark previews for the banner view.

* Move color customization from `TextStyle` to `Text` component.

* Rename `InfoList` design components, use them in `AnalyticsOptInView` too.

* Cleanup MatrixClient.

* Fix copy&paste error

Co-authored-by: Benoit Marty <benoit@matrix.org>

* Fix typo

* Fix Maestro tests

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2023-07-17 18:34:36 +02:00
Marco Romano 004b86b05d MapLibre compose wrapper library (#877)
Heavily inspired from https://github.com/googlemaps/android-maps-compose It doesn't aim to be a full featured library like android-maps-compose, it's been stripped down to only handle our use cases.

Related to:
https://github.com/vector-im/element-meta/issues/1674
https://github.com/vector-im/element-meta/issues/1682
2023-07-17 16:22:29 +02:00
Benoit Marty e2f3f2966b Remove ElementColors. We should use semantics and material colors now. 2023-07-10 17:33:42 +02:00
Benoit Marty 73fa6fc6be Remove the legacy script which imports Strigns from Element Android project. 2023-07-10 12:15:41 +02:00
Benoit Marty 77e2ff4953 Merge pull request #781 from vector-im/feature/bma/waitingListScreen
Implement waiting list screen (error IO_ELEMENT_X_WAIT_LIST)
2023-07-06 18:24:41 +02:00
Marco Romano 3449ea486a Optional day night preview annotation (#793)
Adds the `@DayNightPreviews` annotation that when used on a composable will:
- Display both a day mode and night mode preview in Android Studio.
- Produce both a day and night screenshot during screenshot testing.

The usage of this new annotation is optional, all the current previews continue to work without breakages.
New code can use, when appropriate, the new `@DayNightPreviews` annotation and replace the pattern using three `LightPreview/DarkPreview/ContentToPreview` functions with:

```
@DayNightPreviews
@Composable
fun MyScreenPreview(@PreviewParameter(MyStateProvider::class) state: MyState) {
    ElementPreview {
        MyScreen(
            state = state,
        )
    }
}
```
2023-07-06 12:35:54 +02:00
Benoit Marty 41e722cba4 Move string screen_waitlist_ to module login. 2023-07-05 15:53:28 +02:00
Marco Romano ca695ca077 Revert "Auto generate dark mode previews and screenshots (#776)" (#784)
This reverts commit fd467c2451.
2023-07-05 15:47:53 +02:00
Marco Romano fd467c2451 Auto generate dark mode previews and screenshots (#776)
With this change, composable previews and screenshots should be created with just:
```
@ElementPreviews
@Composable
fun MyViewPreview() {
    ElementPreview { 
        MyView()
    }
}
```

- Adds `@ElementPreviews` which is a shorthand for:
```
@Preview(name = "D")
@Preview(name = "N", uiMode = Configuration.UI_MODE_NIGHT_YES)
```
Should be used in connection with the now public `fun ElementPreview()` composable.

- Adds ElementPreviews to previewAnnotations in dangerfile
- Screenshots of night mode previews are now rendered with night mode
- Replaces `ElementPreviewLight` and `ElementThemedPreview` with `ElementPreview`
- Deprecates `ElementPreviewDark` which should be removed.
- Remaining usages of `ElementPreviewDark` are now ignored during screenshot tests
2023-07-05 13:58:24 +02:00
Benoit Marty 3c601c4210 Fix false positive. 2023-07-03 17:09:04 +02:00
Jorge Martin Espinosa 683b0b3594 Link Compound's TypographyTokens to ElementTheme. (#700)
* Link Compound's `TypographyTokens` to `ElementTheme`.

Also add some docs about when we should use each set of tokens.

* Renamed `LocalColors` to `LocalLegacyColors`.

Made both `LocalLegacyColors` and `LocalCompoundColors` internal. This means it will need to always be used through `ElementTheme.`

Also, removed any usages of `LocalColors.current` accross the project, they're now used through `ElementTheme.legacyColors`.
2023-06-28 08:53:20 +00:00
Benoit Marty c33a08b602 Merge pull request #684 from vector-im/feature/bma/stringR
Quick PR to introduce `CommonStrings` type alias
2023-06-27 16:00:31 +02:00
Chris Smith ca1df5829f Danger: remove "add screenshots" warning (#691)
We have screenshot tests that basically negate the need for this,
and when we're doing more complicated things we tend to use
videos anyway which aren't caught by this check.
2023-06-27 15:37:44 +02:00
Benoit Marty 931edb27ae Update check rule. 2023-06-27 09:55:14 +02:00
Jorge Martin Espinosa 9251cbf536 [Message Actions] Report messages (#642)
* Add report messages feature

* Try to improve how snackbars are delivered

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-23 10:44:47 +02:00
Benoit Marty cd377edec6 Ensure files downloaded by localazy end with a new line. 2023-06-16 15:14:00 +02:00
Benoit Marty 8f8ac76d69 Prevent direct usage of io.element.android.libraries.ui.strings.R package. 2023-06-09 18:24:51 +02:00
Benoit Marty b72cf1dcdd Update strings. 2023-06-09 16:34:22 +02:00
Benoit Marty 7001c7b9cc Account provider screen. - Crashing 2023-06-07 09:00:20 +02:00
Benoit Marty 67e85e0a36 Change account provider screen. 2023-06-07 09:00:20 +02:00
Yoan Pintas f534ecda96 Init analytics modules (#350) 2023-06-05 13:11:34 +00:00
Chris Smith 5de90c3871 Danger: don't complain about reviewers (#509)
Now we have a CODEOWNERS file a reviewer is assigned automatically,
so there's no need for this.

It also misfires a bunch (maybe if there are no _pending_ reviewers
because they've already reviewed?), so removing it fixes that noise.
2023-06-01 14:02:28 +00:00
Jorge Martin Espinosa b040953d7b Merge pull request #501 from vector-im/misc/jme/remove-duplicate-danger-reports
Remove duplicate issue reporting by Danger
2023-06-01 12:15:37 +02:00
Benoit Marty ed18d2b343 Merge pull request #494 from vector-im/feature/bma/checkCode
Check code
2023-06-01 11:53:53 +02:00