TAC: Release Announcement (#12380)

* WIP

* Store the release announcements in the account settings

* Update TAC release announcement description

* Fix settings content comparison

* Add logging in case of failure

* Watch settings changes

* I add release announcement settings to disable it

* Disable release announcement in e2e test

* Add release announcement in e2e test

* Add tests for ReleaseAnnouncementStore.ts

* Update compound-web to `3.3.0`

* Update TAC tests

* Update Labs tests

* Nits

* Add test for ReleaseAnnouncement.tsx

* Update `@vector-im/compound-web`

* Add playwright snapshot

* Delete false playwright screenshot

* Wait for EW to be displayed after reload

* Add screenshot

* Clean util file

* Renaming and comments fixing

* Use second store instead of looking in the store.

---------

Co-authored-by: R Midhun Suresh <hi@midhun.dev>
This commit is contained in:
Florian Duros 2024-04-08 10:43:59 +02:00 committed by GitHub
parent 156f2fa50a
commit 5815e70b76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 805 additions and 45 deletions

View file

@ -89,6 +89,7 @@ export enum LabGroup {
Encryption,
Experimental,
Developer,
Ui,
}
export enum Features {
@ -98,6 +99,7 @@ export enum Features {
OidcNativeFlow = "feature_oidc_native_flow",
// If true, every new login will use the new rust crypto implementation
RustCrypto = "feature_rust_crypto",
ReleaseAnnouncement = "feature_release_announcement",
}
export const labGroupNames: Record<LabGroup, TranslationKey> = {
@ -114,6 +116,7 @@ export const labGroupNames: Record<LabGroup, TranslationKey> = {
[LabGroup.Encryption]: _td("labs|group_encryption"),
[LabGroup.Experimental]: _td("labs|group_experimental"),
[LabGroup.Developer]: _td("labs|group_developer"),
[LabGroup.Ui]: _td("labs|group_ui"),
};
export type SettingValueType =
@ -1145,6 +1148,24 @@ export const SETTINGS: { [setting: string]: ISetting } = {
default: false,
isFeature: true,
},
/**
* Enable or disable the release announcement feature
*/
[Features.ReleaseAnnouncement]: {
isFeature: true,
labsGroup: LabGroup.Ui,
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
default: true,
displayName: _td("labs|release_announcement"),
},
/**
* Managed by the {@link ReleaseAnnouncementStore}
* Store the release announcement data
*/
"releaseAnnouncementData": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
default: {},
},
[UIFeature.RoomHistorySettings]: {
supportedLevels: LEVELS_UI_FEATURE,
default: true,