Commit graph

27 commits

Author SHA1 Message Date
Benoit Marty
57e9153a0e Copyright: Add missing headers 2025-11-10 11:05:31 +01:00
Benoit Marty
dcc74c811f Update danger check on translations. 2024-12-13 16:15:31 +01:00
Benoit Marty
84a9118992 We do not require Sign-off anymore, but use CLA instead. 2024-12-13 16:10:21 +01:00
Jorge Martin Espinosa
79c17f714f
Use Anvil KSP instead of the Square KAPT one (#3564)
* Use Anvil KSP instead of the Square KAPT one

* Fix several configuration cache, lint and test issues

* Allow incremental kotlin compilation in the CI

* Workaround Robolectric + Compose issue that caused `AppNotIdleException`

* Update the `enterprise` commit hash

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2024-10-02 11:52:17 +00:00
Jorge Martin Espinosa
1f69722bdd
Remove Showkase processor not found warning from Danger (#3148)
Instead create a new rule to check if the package name is included in `ComposablePreviewProvider`.
2024-07-05 15:15:18 +02:00
Benoit Marty
ffa4bec78c Towncrier is gone, iterate on danger checks 2024-06-27 12:02:29 +02:00
Benoit Marty
b08b747abf Organization renaming: fix value danger file. 2023-12-13 09:54:34 +01:00
Benoit Marty
75d6eaf8f3 Organization renaming: replace all https://github.com/vector-im by https://github.com/element-hq 2023-12-13 09:40:07 +01:00
Benoit Marty
0e4c146e87 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
97f2d211ae Detekt: Rename LargeHeightPreview to PreviewWithLargeHeight to follow naming convention.
MultiPreview annotations should start with `Preview` as prefix

Detekt: Rename `LargeHeightPreview` to `PreviewWithLargeHeight` to follow naming convention.
Custom Preview annotations should start with `Preview` as prefix
2023-09-21 08:30:15 +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
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
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
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
Chris Smith
6165e60e53 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
Chris Smith
e5912edfb5 Add Marco to dangerfile (#388) 2023-05-04 12:39:40 +00:00
Benoit Marty
edb5695e24 Merge pull request #179 from vector-im/michaelk/danger_check_github_org
Attempt to check org/group membership before danger complains about signoff.
2023-04-18 10:49:46 +02:00
Michael Kaye
fc0373d1e5 Check for team membership, not org membership 2023-04-04 12:57:43 +01:00
Michael Kaye
15d8980214 Fix 2023-04-04 12:48:54 +01:00
Jorge Martín
ebbc4e1569 Add Chris to the team in the Dangerfile, remove some former colleagues 😢 2023-04-03 16:15:13 +02:00
Jorge Martin Espinosa
93a77d94c1 Try to improve Danger rule for PNGs to ignore screenshots (#234) 2023-03-20 15:09:50 +01:00
Michael Kaye
9df1359f61 Attempt to check public org membership before complaining about signoff. 2023-03-13 14:30:41 +00:00
Benoit Marty
bf6bf9a739 white list renovate, so that the tool does not need to sign-off. 2023-03-07 11:28:52 +01:00
Benoit Marty
cf832ffef4 Allow user github-actions[bot] to update translations.
Check that new strings are not added to `values/strings.xml`
Signoff not required for "github-actions[bot]" user.
2023-01-19 11:13:48 +01:00
Benoit Marty
b2719bc3bc Setup towncrier 2023-01-11 14:57:14 +01:00
Benoit Marty
d7a7e16712 Add quality workflow and Danger files. 2022-12-09 12:06:37 +01:00