The `Provider` suffix reads as a dependency provider rather than as preview
data, and it collides with the real providers in the codebase — `StringProvider`,
`PickerProvider`, the login feature's `AccountProvider` — so the name says
nothing about which of the two a class is. `PreviewParam` says it.
195 classes are renamed, along with the 185 files named after them, the konsist
rule that enforces the convention, the presentation-class file templates and the
onboarding documentation.
This cannot be split. `Konsist.scopeFromProduction()` scans the whole project, so
flipping the assertion before every class has moved leaves the rule red, and a
rule that accepted either suffix during a transition would be exactly the kind of
compatibility layer this convention change is meant to remove.
Two judgement calls in the rule itself. The `name.endsWith("PreviewProvider")`
exclusion is dropped: its only job was to reject a redundant `Preview` before
`Provider`, and the new suffix already contains it; no class currently ends with
`PreviewProvider`, so removing it changes nothing today. And
`EditableAvatarViewUriProvider` is renamed rather than deleted from the exclusion
list even though no such class exists in this repository, since it presumably
comes from the modules overlaid for the enterprise build.
Nothing keyed off the old suffix: no snapshot filename contains a provider class
name, so no Paparazzi image changes, and the Kover variants match on `*Presenter`,
`*State` and `*ViewKt`, so coverage bounds are unaffected.
Document PermissionsStore, PermissionStateProvider, LocalNetworkPermissionAdvisor
and the PermissionsPresenter factory, along with their members and parameters.
The store doc explains why the module exists: Android does not let an app
distinguish "never asked" from "asked and denied", so the app has to remember
that itself in order to decide whether it may show a rationale.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Remove no longer temporary string
These are now in localazy and the sync strings CI flow was failing because we have 2 conflicting values in `temporary.xml` and `localazy.xml`
* Use the right placeholder value in `screen_local_network_opt_in_subtitle`
* Localazy: improve search, parallelize checks
The search for XML files has been narrowed down and it's several times faster now, and processing the files is now done in parallel
* Improve script to also find and delete previous files
Also add the option of having a `-v|--verbose` flag to print which files we're modifying
* Use `LocalBuildMeta` to get the app name inside `LocalNetworkPermissionDialogView`
* Allow finding all the forbidden terms in the strings and translations and then return an error exit code instead of a success one
---------
Co-authored-by: ElementBot <android@element.io>
* Remove no longer temporary string
These are now in localazy and the sync strings CI flow was failing because we have 2 conflicting values in `temporary.xml` and `localazy.xml`
* Use the right placeholder value in `screen_local_network_opt_in_subtitle`
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
- Do not reset the analytics store, so that we do not ask the user consent again => Parity with iOS.
- Do not reset the permission store, because it contains information that's related to the system permission, which cannot be retrieved otherwise => Should help with #3195.
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."
* 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>
* Add QR code login.
* Add FF to disable it in release mode.
* Force portrait orientation on the login flow.
* Create `NumberedList` UI components.
* Improve camera permission dialog.
* Make nodes in qrcode feature use `QrCodeLoginScope` instead of `AppScope`
* Bump SDK version.
* Fix maestro tests
---------
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>