Separate labs and betas more clearly (#8969)
* Separate labs and betas more clearly Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Fix tests Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Capitalize `L` in `Labs` Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Use `labsSections` instead of `SdkConfig.get("show_labs_settings")` Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Link to `betas.md` instead of `labs.md` Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Change labs label back to `Labs` Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Improve labs section copy Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Improve labs flags copy Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * i18n Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Fix cypress tests Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Reduce diff Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Remove empty line Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Fix comment Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Remove margin-bottom for the last child Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Improve code based on review Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Fix ts Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Improve ts Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Fix ts Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Improve code Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Improve TS Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
5cbb748843
commit
b0dfb2262e
8 changed files with 128 additions and 70 deletions
|
@ -295,6 +295,16 @@ export default class SettingsStore {
|
|||
return SETTINGS[settingName].isFeature;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a setting should have a warning sign in the microcopy
|
||||
* @param {string} settingName The setting to look up.
|
||||
* @return {boolean} True if the setting should have a warning sign.
|
||||
*/
|
||||
public static shouldHaveWarning(settingName: string): boolean {
|
||||
if (!SETTINGS[settingName]) return false;
|
||||
return SETTINGS[settingName].shouldWarn ?? false;
|
||||
}
|
||||
|
||||
public static getBetaInfo(settingName: string): ISetting["betaInfo"] {
|
||||
// consider a beta disabled if the config is explicitly set to false, in which case treat as normal Labs flag
|
||||
if (SettingsStore.isFeature(settingName)
|
||||
|
@ -355,7 +365,7 @@ export default class SettingsStore {
|
|||
public static getValueAt(
|
||||
level: SettingLevel,
|
||||
settingName: string,
|
||||
roomId: string = null,
|
||||
roomId: string | null = null,
|
||||
explicit = false,
|
||||
excludeDefault = false,
|
||||
): any {
|
||||
|
@ -420,7 +430,7 @@ export default class SettingsStore {
|
|||
private static getFinalValue(
|
||||
setting: ISetting,
|
||||
level: SettingLevel,
|
||||
roomId: string,
|
||||
roomId: string | null,
|
||||
calculatedValue: any,
|
||||
calculatedAtLevel: SettingLevel,
|
||||
): any {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue