diff --git a/res/css/structures/_SpaceRoomView.scss b/res/css/structures/_SpaceRoomView.scss index 945de01eba..d6dca8b675 100644 --- a/res/css/structures/_SpaceRoomView.scss +++ b/res/css/structures/_SpaceRoomView.scss @@ -212,9 +212,10 @@ $SpaceRoomViewInnerWidth: 428px; } } - > .mx_BaseAvatar_image, - > .mx_BaseAvatar > .mx_BaseAvatar_image { - border-radius: 12px; + > .mx_RoomAvatar_isSpaceRoom { + &.mx_BaseAvatar_image, .mx_BaseAvatar_image { + border-radius: 12px; + } } h1.mx_SpaceRoomView_preview_name { diff --git a/res/css/views/settings/tabs/user/_PreferencesUserSettingsTab.scss b/res/css/views/settings/tabs/user/_PreferencesUserSettingsTab.scss index 4cdfa0b40f..d6f4064e35 100644 --- a/res/css/views/settings/tabs/user/_PreferencesUserSettingsTab.scss +++ b/res/css/views/settings/tabs/user/_PreferencesUserSettingsTab.scss @@ -21,6 +21,10 @@ limitations under the License. .mx_SettingsTab_section { margin-bottom: 30px; + + > details + .mx_SettingsFlag { + margin-top: 20px; + } } .mx_PreferencesUserSettingsTab_CommunityMigrator { diff --git a/res/img/betas/.gitkeep b/res/img/betas/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/res/img/betas/spaces.png b/res/img/betas/spaces.png deleted file mode 100644 index f4cfa90b4e..0000000000 Binary files a/res/img/betas/spaces.png and /dev/null differ diff --git a/src/components/structures/GroupFilterPanel.js b/src/components/structures/GroupFilterPanel.js index 5d1be64f25..a72790b928 100644 --- a/src/components/structures/GroupFilterPanel.js +++ b/src/components/structures/GroupFilterPanel.js @@ -122,19 +122,13 @@ class GroupFilterPanel extends React.Component { mx_GroupFilterPanel_items_selected: itemsSelected, }); - let betaDot; - if (SettingsStore.getBetaInfo("feature_spaces") && !localStorage.getItem("mx_seenSpacesBeta")) { - betaDot =
; - } - let createButton = ({ _t("If you leave, %(brand)s will reload with Spaces disabled. " + - "Communities and custom tags will be visible again.", { - brand: SdkConfig.get().brand, - }) }
-{ _t("Beta available for web, desktop and Android. Thank you for trying the beta.") }
- >; - } - - return <> -{ _t("%(brand)s will reload with Spaces enabled. " + - "Communities and custom tags will be hidden.", { - brand: SdkConfig.get().brand, - }) }
- { _t("You can leave the beta any time from settings or tapping on a beta badge, " + - "like the one above.") } -{ _t("Beta available for web, desktop and Android. " + - "Some features may be unavailable on your homeserver.") }
- >; - }, - image: require("../../res/img/betas/spaces.png"), - feedbackSubheading: _td("Your feedback will help make spaces better. " + - "The more detail you can go into, the better."), - feedbackLabel: "spaces-feedback", - }, - }, "feature_dnd": { isFeature: true, displayName: _td("Show options to enable 'Do not disturb' mode"), @@ -203,7 +165,7 @@ export const SETTINGS: {[setting: string]: ISetting} = { ), supportedLevels: LEVELS_FEATURE, default: false, - controller: new IncompatibleController("feature_spaces"), + controller: new IncompatibleController("showCommunitiesInsteadOfSpaces", false, false), }, "feature_pinning": { isFeature: true, @@ -223,7 +185,7 @@ export const SETTINGS: {[setting: string]: ISetting} = { displayName: _td("Group & filter rooms by custom tags (refresh to apply changes)"), supportedLevels: LEVELS_FEATURE, default: false, - controller: new IncompatibleController("feature_spaces"), + controller: new IncompatibleController("showCommunitiesInsteadOfSpaces", false, false), }, "feature_state_counters": { isFeature: true, @@ -769,6 +731,14 @@ export const SETTINGS: {[setting: string]: ISetting} = { supportedLevels: LEVELS_ACCOUNT_SETTINGS, default: false, }, + "showCommunitiesInsteadOfSpaces": { + displayName: _td("Display Communities instead of Spaces"), + description: _td("Temporarily show communities instead of Spaces. " + + "Support for this will be removed in the near future. This will reload Element"), + supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG, + default: false, + controller: new ReloadOnChangeController(), + }, [UIFeature.RoomHistorySettings]: { supportedLevels: LEVELS_UI_FEATURE, default: true, @@ -832,7 +802,7 @@ export const SETTINGS: {[setting: string]: ISetting} = { [UIFeature.Communities]: { supportedLevels: LEVELS_UI_FEATURE, default: true, - controller: new IncompatibleController("feature_spaces"), + controller: new IncompatibleController("showCommunitiesInsteadOfSpaces", false, false), }, [UIFeature.AdvancedSettings]: { supportedLevels: LEVELS_UI_FEATURE, diff --git a/src/settings/controllers/IncompatibleController.ts b/src/settings/controllers/IncompatibleController.ts index c48ce0a60b..3a7d6ab7d7 100644 --- a/src/settings/controllers/IncompatibleController.ts +++ b/src/settings/controllers/IncompatibleController.ts @@ -24,7 +24,11 @@ import SettingsStore from "../SettingsStore"; * labs flags. */ export default class IncompatibleController extends SettingController { - public constructor(private settingName: string, private forcedValue = false) { + public constructor( + private settingName: string, + private forcedValue = false, + private incompatibleValue: any = true, + ) { super(); } @@ -34,13 +38,13 @@ export default class IncompatibleController extends SettingController { calculatedValue: any, calculatedAtLevel: SettingLevel, ): any { - if (this.incompatibleSettingEnabled) { + if (this.incompatibleSetting) { return this.forcedValue; } return null; // no override } - public get incompatibleSettingEnabled(): boolean { - return SettingsStore.getValue(this.settingName); + public get incompatibleSetting(): boolean { + return SettingsStore.getValue(this.settingName) === this.incompatibleValue; } } diff --git a/src/stores/SpaceStore.tsx b/src/stores/SpaceStore.tsx index da18646d0f..5c0267f0ec 100644 --- a/src/stores/SpaceStore.tsx +++ b/src/stores/SpaceStore.tsx @@ -71,7 +71,7 @@ export interface ISuggestedRoom extends ISpaceSummaryRoom { const MAX_SUGGESTED_ROOMS = 20; // This setting causes the page to reload and can be costly if read frequently, so read it here only -const spacesEnabled = SettingsStore.getValue("feature_spaces"); +const spacesEnabled = !SettingsStore.getValue("showCommunitiesInsteadOfSpaces"); const getSpaceContextKey = (space?: Room) => `mx_space_context_${space?.roomId || "HOME_SPACE"}`; @@ -764,7 +764,8 @@ export class SpaceStoreClass extends AsyncStoreWithClient