Commit Graph

14 Commits

Author SHA1 Message Date
Benoit Marty
7be0e3ea4b Remove ElementTextStyles. Only ElementTheme.typography.* styles must be used now. 2023-07-10 17:33:42 +02:00
Marco Romano
f33561c25d Revert "Auto generate dark mode previews and screenshots (#776)" (#784)
This reverts commit 79b529193c.
2023-07-05 15:47:53 +02:00
Marco Romano
79b529193c 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
ganfra
e3744636b6 Merge branch 'develop' into feature/fga/room_list_api 2023-06-28 15:14:06 +02:00
Jorge Martin Espinosa
02dc447624 [Compound] Integrate compound tokens (#586)
* Added tokens.

* Apply color to MaterialTheme, also add typography.

* Map colors to the right ones in the themes.

* Create and improve previews of some components

* More preview improvements

* Add `tertiary` and `onTertiary` colors, remove some unused ones.

* Fix usage of deleted color token

* Fix bug in Switch previews

* Create a separate `:libraries:theme` module to keep everything related to colors, typography and Compound in general.

* Fix `DatePickerPreview`

* Add missing Compound generated files by fixing their package name

* Move `ElementTheme` to the `:libraries:theme` module, make some variables internal.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-27 16:15:40 +00:00
ganfra
3765df9c39 NetworkMonitor: new strategy, looks like it works. 2023-06-27 17:58:45 +02:00
Benoit Marty
4a8c49fa28 Use CommonStrings everywhere 2023-06-27 09:45:00 +02:00
ganfra
bb4f61fe12 RoomList: try syncing when network is back and inError state 2023-06-23 17:07:27 +02:00
ganfra
1185dbd276 Network monitor : try to make it more reliable... 2023-06-23 16:48:31 +02:00
ganfra
37174cf53c API: simplify NetworkMonitor api 2023-06-22 15:47:15 +02:00
Chris Smith
1d041578f7 Make danger check view changes (#391)
Make danger check view changes

Add a check that if a file with @Preview or @LargeHeightPreview
in it is changed, then the corresponding build file includes
the showkase processor.

Also change the check that prompts about screenshots to use
the same @Preview logic instead of checking for "/layout" in
the path which doesn't work with compose.

Also add missing showkase processors
2023-05-05 08:24:12 +00:00
Jorge Martin Espinosa
e2b2dbf59f [Room list] Search & menu improvements (#356)
* Remove settings menu item, start splitting search UI. Also, add `applyIf` and `circularReveal` modifiers.

* Split UI & logic for room list search

* Suppress `composed` warning, improve its debuggability

* Add content description to the user's avatar, fix window insets. Also, remove unused `SearchRoomListTopBar`.
2023-04-25 11:35:36 +00:00
Jorge Martin Espinosa
e651d2f9c5 Fix: improve offline indicator designs (#341)
* Use the right font weight for the offline indicator title.

* Remove unneeded suppression in some build files.
2023-04-19 15:58:56 +02:00
Jorge Martin Espinosa
798bedcaed [Room List] Show offline indicator when the device is offline (#239)
* Implement the network status indicator.

* Add `networkmonitor` feature.
2023-04-17 17:01:16 +02:00