Add UIFeature to hide public space and room creation (#30708)

* Add settings to hide public room & space creation.

* Add space changes.

* Add room changes.

* lint

* Add playwright tests

* don't specialcase 1 join rule

* Ensure mocks get cleared

* Fixup test

* Add SpaceCreateMenu component unit-tests

* Fixup create room test asserts

* fix import
This commit is contained in:
Will Hunt
2025-09-08 13:53:13 +00:00
committed by GitHub
parent 9e7f583acc
commit 6d05bfc4c5
13 changed files with 264 additions and 22 deletions
+8
View File
@@ -1425,6 +1425,14 @@ export const SETTINGS: Settings = {
supportedLevels: LEVELS_UI_FEATURE,
default: true,
},
[UIFeature.AllowCreatingPublicSpaces]: {
supportedLevels: LEVELS_UI_FEATURE,
default: true,
},
[UIFeature.AllowCreatingPublicRooms]: {
supportedLevels: LEVELS_UI_FEATURE,
default: true,
},
// Electron-specific settings, they are stored by Electron and set/read over an IPC.
// We store them over there are they are necessary to know before the renderer process launches.
+2
View File
@@ -25,6 +25,8 @@ export const enum UIFeature {
RoomHistorySettings = "UIFeature.roomHistorySettings",
TimelineEnableRelativeDates = "UIFeature.timelineEnableRelativeDates",
BulkUnverifiedSessionsReminder = "UIFeature.BulkUnverifiedSessionsReminder",
AllowCreatingPublicRooms = "UIFeature.allowCreatingPublicRooms",
AllowCreatingPublicSpaces = "UIFeature.allowCreatingPublicSpaces",
}
export enum UIComponent {