Commit graph

44 commits

Author SHA1 Message Date
Benoit Marty
d531e71cd8 Migrate other icons to compound icons. 2023-09-20 16:44:59 +02:00
Benoit Marty
f808dcd6ea
Merge pull request #1372 from vector-im/feature/bma/dayNightPreview
Day night preview annotation
2023-09-19 14:04:49 +02:00
jonnyandrew
ee8d27e927
[Rich text editor] Add link functionality to rich text editor (#1309)
* Add link functionality to rich text editor
* Add 'list dialog' component compound design library
* Add 'text field list item' component to compound design library
2023-09-19 11:20:07 +00:00
Benoit Marty
2819448cd4 Use DayNightPreview 2023-09-19 11:49:12 +02:00
Benoit Marty
0453ea5904 Localazy sync 2023-09-18 16:42:35 +02:00
bmarty
d2f9b02bbf Sync Strings from Localazy 2023-09-18 00:09:19 +00:00
ganfra
b382993cbb Sync Strings from Localazy 2023-09-14 14:38:49 +00:00
Marco Romano
7fdd83bf91 GRemove the @JvmField annotation whenever using WarmUpRule. 2023-09-13 15:19:26 +02:00
jonnyandrew
9e5b46200b
Reduce test flakiness by warming up molecule tests (#1226) 2023-09-06 10:08:21 +00:00
Benoit Marty
36bf343a95 OptIn screen: make only the here word be clickable. 2023-08-29 16:46:42 +02:00
Benoit Marty
ff47629f6c Make the link open the policy url in the analytics setting screen. 2023-08-29 16:33:03 +02:00
Benoit Marty
5f7c1e9545 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
8415826a97 Import strings with Localazy. 2023-08-25 12:15:06 +02:00
ElementBot
ef8a60b657
Sync Strings from Localazy (#1098)
Co-authored-by: bmarty <bmarty@users.noreply.github.com>
2023-08-21 08:34:19 +02:00
Jorge Martin Espinosa
9e1ff513e4
[Compound] Implement Snackbars based on designs (#1054)
* Make `InternalButton` internal instead of private so it can be customised.

Also, change the `ButtonColors.contentColor` for text buttons to `LocalContentColor.current` by default.

* Add temporary color for Snackbar action label

* Implement `Snackbar` component based on Compound

* Propagate changes to all other components

* Use right Preview annotation config

* Move `ButtonVisuals` to their own file

* Update screenshots

* Make previews internal

* Update screenshots

* Set a custom token for contentColor in AppBars

* Change 'Label' to 'Action' in the previews

* Add changelog

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-08-16 10:38:28 +00:00
ElementBot
38a25dc3e9
Sync Strings from Localazy (#1032)
Co-authored-by: Florian14 <Florian14@users.noreply.github.com>
2023-08-11 14:34:05 +00:00
Jorge Martin Espinosa
23982dde47
[Compound] Implement components (Button) (#1021)
* Create `CompoundButton`

* Some fixes

* Lint fixes

* Start replacing existing `Button` usages

* Replace button usages

* Remove previous Button composable

* Rename `CompoundButton` to `Button`

* Fix emphasized button being displayed as Text

* Fix cancel button in `WaitListView`

* Update screenshots

* Add shorthand functions for `OutlinedButton` and `TextButton`

* Add changelog

* Fix wrong size used for emphasized button in dialog

* Create a private `ButtonInternal` implementation with the shared logic.

- Make `ButtonStyle` private.
- Rename `title` to `text`.
- Rename `buttonStyle` and `buttonSize` to just `style` and `size`.

* Fix several warnings and lint issues.

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-08-08 16:11:37 +00:00
Benoit Marty
822bb82347
Merge pull request #967 from vector-im/feature/bma/detektConfig
Update detekt config.
2023-07-28 16:47:26 +02:00
Benoit Marty
8f4b664158 Sync strings. 2023-07-27 12:16:04 +02:00
Benoit Marty
6aa5239189 Enable detekt rule PreviewPublic and fix existing issues. 2023-07-26 10:08:39 +02:00
renovate[bot]
156bf08b7a
Update dependency app.cash.molecule:molecule-runtime to v1 (#925)
* Update dependency app.cash.molecule:molecule-runtime to v1

* Replace `RecompositionClock` with `RecompositionMode`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2023-07-20 07:36:19 +02:00
Benoit Marty
197ac61670 Use the modifier parameter. 2023-07-18 10:12:56 +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
Benoit Marty
88eaab0e44 Fix regression on some colors. Introduce a temporary color, since the color values are not in Compound. temporaryColorBgSpecial 2023-07-11 10:29:06 +02:00
Benoit Marty
ff5cecb5cf TextStyle again. 2023-07-10 17:33:42 +02:00
Benoit Marty
5846af2aa4 Remove ElementTextStyles. Only ElementTheme.typography.* styles must be used now. 2023-07-10 17:33:42 +02:00
Benoit Marty
e2f3f2966b Remove ElementColors. We should use semantics and material colors now. 2023-07-10 17:33:42 +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
34f4078d5f Move BuildMeta fake to common test module. 2023-07-03 17:09:04 +02:00
Benoit Marty
df437d2aba Use color from design (same value) 2023-07-03 17:09:04 +02:00
bmarty
6e54ed7b77 Sync Strings from Localazy 2023-07-03 00:11:17 +00:00
Benoit Marty
011f7a1064 Rename ElementX to Element X. Only for user facing value. In the doc I prefer to keep ElementX. 2023-06-29 14:15:36 +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
Jorge Martin Espinosa
a16335b4b7 [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
798da50454 Use CommonStrings everywhere 2023-06-27 09:45:00 +02:00
bmarty
874739ece9 Sync Strings from Localazy 2023-06-26 00:10:53 +00:00
github-actions[bot]
fe5524bae4 Sync Strings (#630)
* Sync Strings from Localazy

* Update strings, remove broken German translation

* Update screenshots

---------

Co-authored-by: bmarty <bmarty@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-19 11:18:01 +00:00
Benoit Marty
bd9aa38f6a Add Modifier parameter and make internal Composable private. 2023-06-16 15:27:36 +02:00
Benoit Marty
fbd366c40a Delete obsolete translation (also deleted on Localazy) 2023-06-16 12:00:29 +02:00
Benoit Marty
b36fd098d3 Make the link to the policy active. 2023-06-16 10:47:09 +02:00
Benoit Marty
9701abf15e Extract method about text to the design system module. 2023-06-16 09:40:00 +02:00
Benoit Marty
fb0124c438 Iterate on analytics OptIn screen 2023-06-16 09:28:21 +02:00
Yoan Pintas
f534ecda96 Init analytics modules (#350) 2023-06-05 13:11:34 +00:00