Commit Graph

32 Commits

Author SHA1 Message Date
Benoit Marty
1292da2a72 Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
Benoit Marty
b748fcc631 Copyright: Add final period 2025-11-10 10:13:41 +01:00
Benoit Marty
0a0224b586 Copyright: run command uv run license-editor --repository ../element-x-android 2025-11-10 10:09:26 +01:00
ganfra
68daf8d2cf misc: display offline banner directly in LoggedInFlowNode (and fix window insets) 2025-10-21 16:05:20 +02:00
Benoit Marty
98f793b02e Merge pull request #4226 from element-hq/feature/bma/themeOverride
Theme override
2025-02-06 16:48:16 +01:00
Jorge Martin Espinosa
c040cec108 Create SyncOrchestrator (#4176)
* Create `SyncOrchestrator` to centralise the sync start/stop flow through the whole app: the decision is based on several inputs: sync state, network available, app in foreground, app in call, app needing to sync an event for a notification.

* Make network monitor return network connectivity status, not internet connectivity

* Don't stop the `SyncService` when network connection is lost, let it fail instead. This prevents an issue when using the offline mode of the SDK, which made the wrong UI states to be shown when the `SyncState` is `Idle` (that is, after the service being manually stopped).

* Rename `NetworkStatus.Online/Offline` to `Connected/Disconnected` so they're not easily mistaken with internet connectivity instead
2025-02-06 16:36:57 +01:00
Benoit Marty
0d6d74512f Use ElementTheme instead of MaterialTheme 2025-02-06 15:10:15 +01:00
Benoit Marty
05fc76822a Apply dual licenses: AGPL + Element Commercial to file headers.
2 replace all actions have been performed:
- "SPDX-License-Identifier: AGPL-3.0-only" to "SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial"
- "Please see LICENSE in the repository root for full details." to "Please see LICENSE files in the repository root for full details."
2025-01-07 10:05:04 +01: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
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
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
72b89338b3 Remove Modifier parameter in private function when only default value is used.
This will improve the code coverage metrics, and this also fixes a few potential bug, where the Modifier was used several times.
2024-02-08 11:06:06 +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
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
308a0c0f57 Konsist: add test to ensure filename match top level Composable View, and fix existing issue 2023-10-10 15:39:22 +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
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
Jorge Martin Espinosa
c1ae0ead3b Fix top padding in room list when app is opened in offline mode (#1299)
* Fix top padding in room list when app is opened in offline mode

* Fix `avatarBloom` not passing the `bottomSoftEdgeColor` to `bloom`
2023-09-13 15:13:15 +00:00
Jorge Martin Espinosa
94dc6f41e2 [Compound] Bloom (#1253)
* Add `bloom` and `avatarBloom` modifiers.

* Add `ConnectivityIndicatorContainer` to control the padding needed at the top.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-09-11 15:43:23 +02:00
Benoit Marty
006ecd51ee Improve rendering of offline banner regarding fontScale. 2023-07-27 15:04:32 +02:00
Benoit Marty
55538c2773 Enable detekt rules UnusedImports and cleanup the code. 2023-07-20 18:00:23 +02:00
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
Benoit Marty
4a8c49fa28 Use CommonStrings everywhere 2023-06-27 09:45:00 +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
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