Add Labs screen for beta testing of public features (#5465)
* Add Labs screen: - Make `Feature` have an `isInLabs` boolean to distinguish private feature flags from public ones. - Have `FeatureFlagsService` provide the list of available flags. - Display the labs item in the settings screen only if there are available public features. - Remove public feature toggles from developer options. - Implement the labs screen with the public features. - Add a clear cache step to the threads feature toggle - Update screenshots --------- Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
parent
a497703a90
commit
9714abe032
34 changed files with 684 additions and 17 deletions
|
|
@ -36,4 +36,10 @@ interface Feature {
|
|||
* If true: the feature is finished, it will not appear in the developer options screen.
|
||||
*/
|
||||
val isFinished: Boolean
|
||||
|
||||
/**
|
||||
* Whether the feature is only available in Labs (and not in developer options).
|
||||
* Feature flags that set this to `true` can be enabled by any users, not only those that have enabled developer mode.
|
||||
*/
|
||||
val isInLabs: Boolean
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,4 +33,9 @@ interface FeatureFlagService {
|
|||
* is registered
|
||||
*/
|
||||
suspend fun setFeatureEnabled(feature: Feature, enabled: Boolean): Boolean
|
||||
|
||||
/**
|
||||
* @return the list of available (not finished) features that can be toggled.
|
||||
*/
|
||||
fun getAvailableFeatures(): List<Feature>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ enum class FeatureFlags(
|
|||
override val description: String? = null,
|
||||
override val defaultValue: (BuildMeta) -> Boolean,
|
||||
override val isFinished: Boolean,
|
||||
override val isInLabs: Boolean = false,
|
||||
) : Feature {
|
||||
RoomDirectorySearch(
|
||||
key = "feature.roomdirectorysearch",
|
||||
|
|
@ -98,6 +99,7 @@ enum class FeatureFlags(
|
|||
description = "Renders thread messages as a dedicated timeline. Restarting the app is required for this setting to fully take effect.",
|
||||
defaultValue = { false },
|
||||
isFinished = false,
|
||||
isInLabs = true,
|
||||
),
|
||||
MultiAccount(
|
||||
key = "feature.multi_account",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue