* 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>
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,
)
}
}
```
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
* 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`.
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.
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.