From 2fc88f8cf0d72e04c07ffcd9dcc96dbb9a929dab Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 24 Jan 2022 12:02:20 +0000 Subject: [PATCH 1/2] De-labs Metaspaces --- .../views/dialogs/UserSettingsDialog.tsx | 15 ++++++--------- src/components/views/spaces/SpacePanel.tsx | 3 +-- src/i18n/strings/en_EN.json | 1 - src/settings/Settings.tsx | 14 -------------- test/stores/SpaceStore-test.ts | 1 - test/stores/enable-metaspaces-labs.ts | 17 ----------------- test/stores/room-list/SpaceWatcher-test.ts | 1 - 7 files changed, 7 insertions(+), 45 deletions(-) delete mode 100644 test/stores/enable-metaspaces-labs.ts diff --git a/src/components/views/dialogs/UserSettingsDialog.tsx b/src/components/views/dialogs/UserSettingsDialog.tsx index 09583bb6b12..de438c42ee9 100644 --- a/src/components/views/dialogs/UserSettingsDialog.tsx +++ b/src/components/views/dialogs/UserSettingsDialog.tsx @@ -127,15 +127,12 @@ export default class UserSettingsDialog extends React.Component "mx_UserSettingsDialog_keyboardIcon", , )); - - if (SettingsStore.getValue("feature_spaces_metaspaces")) { - tabs.push(new Tab( - UserTab.Sidebar, - _td("Sidebar"), - "mx_UserSettingsDialog_sidebarIcon", - , - )); - } + tabs.push(new Tab( + UserTab.Sidebar, + _td("Sidebar"), + "mx_UserSettingsDialog_sidebarIcon", + , + )); if (SettingsStore.getValue(UIFeature.Voip)) { tabs.push(new Tab( diff --git a/src/components/views/spaces/SpacePanel.tsx b/src/components/views/spaces/SpacePanel.tsx index c120d7fd6ac..8e065d2492e 100644 --- a/src/components/views/spaces/SpacePanel.tsx +++ b/src/components/views/spaces/SpacePanel.tsx @@ -303,7 +303,6 @@ const InnerSpacePanel = React.memo(({ children, isPanelCo }); const SpacePanel = () => { - const metaSpacesEnabled = useSettingValue("feature_spaces_metaspaces"); const [isPanelCollapsed, setPanelCollapsed] = useState(true); const ref = useRef(); useLayoutEffect(() => { @@ -366,7 +365,7 @@ const SpacePanel = () => { ) } - { metaSpacesEnabled && } + ) } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index d8bcb2465ff..52808706830 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -886,7 +886,6 @@ "Location sharing (under active development)": "Location sharing (under active development)", "Show info about bridges in room settings": "Show info about bridges in room settings", "New layout switcher (with message bubbles)": "New layout switcher (with message bubbles)", - "Meta Spaces": "Meta Spaces", "Use new room breadcrumbs": "Use new room breadcrumbs", "New spotlight search experience": "New spotlight search experience", "Jump to date (adds /jumptodate)": "Jump to date (adds /jumptodate)", diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx index 6e92200f0b3..2f781c6fe3e 100644 --- a/src/settings/Settings.tsx +++ b/src/settings/Settings.tsx @@ -341,17 +341,6 @@ export const SETTINGS: {[setting: string]: ISetting} = { default: false, controller: new NewLayoutSwitcherController(), }, - "feature_spaces_metaspaces": { - isFeature: true, - labsGroup: LabGroup.Spaces, - supportedLevels: LEVELS_FEATURE, - displayName: _td("Meta Spaces"), - default: false, - controller: new OrderedMultiController([ - new IncompatibleController("showCommunitiesInsteadOfSpaces"), - new ReloadOnChangeController(), - ]), - }, "feature_breadcrumbs_v2": { isFeature: true, labsGroup: LabGroup.Rooms, @@ -865,9 +854,6 @@ export const SETTINGS: {[setting: string]: ISetting} = { default: { [MetaSpace.Home]: true, }, - controller: new IncompatibleController("feature_spaces_metaspaces", { - [MetaSpace.Home]: true, - }, false), }, "Spaces.showPeopleInSpace": { supportedLevels: [SettingLevel.ROOM_ACCOUNT], diff --git a/test/stores/SpaceStore-test.ts b/test/stores/SpaceStore-test.ts index 1f796a1f28c..63b181f0e20 100644 --- a/test/stores/SpaceStore-test.ts +++ b/test/stores/SpaceStore-test.ts @@ -17,7 +17,6 @@ limitations under the License. import { EventType } from "matrix-js-sdk/src/@types/event"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; -import "./enable-metaspaces-labs"; import "../skinned-sdk"; // Must be first for skinning to work import SpaceStore from "../../src/stores/spaces/SpaceStore"; import { diff --git a/test/stores/enable-metaspaces-labs.ts b/test/stores/enable-metaspaces-labs.ts deleted file mode 100644 index f22132a0d66..00000000000 --- a/test/stores/enable-metaspaces-labs.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright 2021 The Matrix.org Foundation C.I.C. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -localStorage.setItem("mx_labs_feature_feature_spaces_metaspaces", "true"); diff --git a/test/stores/room-list/SpaceWatcher-test.ts b/test/stores/room-list/SpaceWatcher-test.ts index 42ffbe53332..66570a8e815 100644 --- a/test/stores/room-list/SpaceWatcher-test.ts +++ b/test/stores/room-list/SpaceWatcher-test.ts @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import "../enable-metaspaces-labs"; import "../../skinned-sdk"; // Must be first for skinning to work import { SpaceWatcher } from "../../../src/stores/room-list/SpaceWatcher"; import type { RoomListStoreClass } from "../../../src/stores/room-list/RoomListStore"; From 644117eee282b7c86e675836c774fd5fc8f0dfcc Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 25 Jan 2022 12:20:41 +0000 Subject: [PATCH 2/2] Tweak margins in the sidebar settings tab to closer match other tabs --- res/css/views/settings/tabs/user/_SidebarUserSettingsTab.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/res/css/views/settings/tabs/user/_SidebarUserSettingsTab.scss b/res/css/views/settings/tabs/user/_SidebarUserSettingsTab.scss index 91869f4e028..42a8f1aaafb 100644 --- a/res/css/views/settings/tabs/user/_SidebarUserSettingsTab.scss +++ b/res/css/views/settings/tabs/user/_SidebarUserSettingsTab.scss @@ -15,6 +15,10 @@ limitations under the License. */ .mx_SidebarUserSettingsTab { + .mx_SettingsTab_section { + margin-top: 10px; + } + .mx_SidebarUserSettingsTab_subheading { font-size: $font-15px; line-height: $font-24px;