Add space management to the flows. (#4978)

* Add the menu entries to add/remove rooms to/from a space.

* Add a user indicator to SpaceAddRoomsScreen.

* Reset the SpaceRoomListProxy after adding/removing any children.

* Calm the animations down a bit when entering EditMode on the SpaceScreen.
This commit is contained in:
Doug
2026-01-21 12:46:02 +00:00
committed by GitHub
parent 5577acac19
commit 3dccdf6685
29 changed files with 237 additions and 89 deletions
@@ -63,7 +63,8 @@ struct SpaceRoomCell: View {
action(.select(spaceServiceRoom))
} label: {
HStack(spacing: 0) {
if isEditModeActive {
if isEditModeActive,
!spaceServiceRoom.isSpace { // We only support selection of rooms (so don't show this while removing the cell).
ZStack {
ListRowAccessory.multiSelection(isSelected)
}
@@ -87,6 +88,9 @@ struct SpaceRoomCell: View {
}
}
.padding(.horizontal, horizontalInsets)
// Ensure the EditMode transition stays inside this cell if there are other insertions/removals in the list.
// Seems to slow down the animations a bit in Xcode previews but its fine in the simulator and on a device.
.drawingGroup()
.accessibilityElement(children: .combine)
}
.buttonStyle(SpaceRoomCellButtonStyle(isHighlighted: isHighlighted))