Merge pull request #6171 from element-hq/feature/fga/enable_spaces_ff

Enable space feature flags by default
This commit is contained in:
ganfra 2026-02-10 21:42:12 +01:00 committed by GitHub
commit 7b2a83c1de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 7 deletions

View file

@ -219,6 +219,7 @@ class ConfigureRoomPresenterTest {
fun `present - when creating a room in a space if the room doesn't receive the power levels value it can't be added to the space`() = runTest {
val addChildToSpaceResult = lambdaRecorder<RoomId, RoomId, Result<Unit>> { _, _ -> Result.success(Unit) }
val spaceService = FakeSpaceService(
editableSpacesResult = { Result.success(emptyList()) },
addChildToSpaceResult = addChildToSpaceResult,
)
val roomInfoFlow = MutableStateFlow<Optional<RoomInfo>>(Optional.empty())
@ -261,6 +262,7 @@ class ConfigureRoomPresenterTest {
fun `present - creating a room and adding it into a parent space works when all the data is available`() = runTest {
val addChildToSpaceResult = lambdaRecorder<RoomId, RoomId, Result<Unit>> { _, _ -> Result.success(Unit) }
val spaceService = FakeSpaceService(
editableSpacesResult = { Result.success(emptyList()) },
addChildToSpaceResult = addChildToSpaceResult,
)
val roomInfoFlow = MutableStateFlow<Optional<RoomInfo>>(Optional.empty())
@ -522,7 +524,9 @@ class ConfigureRoomPresenterTest {
private fun createMatrixClient(
isAliasAvailable: Boolean = true,
spaceService: FakeSpaceService = FakeSpaceService(),
spaceService: FakeSpaceService = FakeSpaceService(
editableSpacesResult = { Result.success(emptyList()) }
),
) = FakeMatrixClient(
userIdServerNameLambda = { "matrix.org" },
resolveRoomAliasResult = {

View file

@ -809,14 +809,13 @@ class SecurityAndPrivacyPresenterTest {
)
)
)
// No spaces available, so isSpaceMemberSelectable should be false
// Room has SpaceMember access with existing space ID, so isSpaceMemberSelectable is true
val presenter = createSecurityAndPrivacyPresenter(room = room)
presenter.test {
skipItems(1)
with(awaitItem()) {
assertThat(savedSettings.roomAccess).isInstanceOf(SecurityAndPrivacyRoomAccess.SpaceMember::class.java)
assertThat(isSpaceMemberSelectable).isFalse()
// showSpaceMemberOption should still be true because savedSettings has SpaceMember
assertThat(isSpaceMemberSelectable).isTrue()
assertThat(showSpaceMemberOption).isTrue()
}
cancelAndIgnoreRemainingEvents()

View file

@ -74,21 +74,21 @@ enum class FeatureFlags(
key = "feature.createSpaces",
title = "Create spaces",
description = "Allow creating spaces.",
defaultValue = { false },
defaultValue = { true },
isFinished = false,
),
SpaceSettings(
key = "feature.spaceSettings",
title = "Space settings",
description = "Allow managing space settings such as details, permissions and privacy.",
defaultValue = { false },
defaultValue = { true },
isFinished = false,
),
RoomListSpaceFilters(
key = "feature.roomListSpaceFilters",
title = "Room list space filters",
description = "Allow filtering the room list by space.",
defaultValue = { false },
defaultValue = { true },
isFinished = false,
),
PrintLogsToLogcat(