Room list: move sections out of labs to all the users (#33810)

* feat: remove section labs flag

* test: update tests

* feat: remove favourites and low prioriy filter in SC

* test: update screenshots

* test: update snapshots

* test: update playwright tests

* test: update playright screenshots

* test: update screenshot

* test: close release announcement

* test: fix skeleton screenshot

* test: fix sliding sync

* test: update room list tests

* test: update room list tests after section dnd

* test: update toast screenshot

* test: update again room list tests

* test: update screenshot
This commit is contained in:
Florian Duros
2026-06-29 16:30:27 +00:00
committed by GitHub
parent 219ca4a3e9
commit aed2009b9f
85 changed files with 131 additions and 846 deletions
-1
View File
@@ -1582,7 +1582,6 @@
"notifications": "Enable the notifications panel in the room header",
"render_reaction_images": "Render custom images in reactions",
"render_reaction_images_description": "Sometimes referred to as \"custom emojis\".",
"room_list_sections": "Room list sections",
"sliding_sync": "Sliding Sync mode",
"sliding_sync_description": "Under active development, cannot be disabled. Currently, not compatible with Element Call.",
"sliding_sync_disabled_notice": "Sign in again to disable",
-10
View File
@@ -227,7 +227,6 @@ export interface Settings {
"feature_render_reaction_images": IFeature;
"feature_new_room_list": IFeature;
"feature_retention": IFeature;
"feature_room_list_sections": IFeature;
"feature_ask_to_join": IFeature;
"feature_notifications": IFeature;
"feature_msc4362_encrypted_state_events": IFeature;
@@ -665,15 +664,6 @@ export const SETTINGS: Settings = {
default: true,
controller: new ReloadOnChangeController(),
},
"feature_room_list_sections": {
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG_PRIORITISED,
labsGroup: LabGroup.Ui,
displayName: _td("labs|room_list_sections"),
description: _td("labs|under_active_development"),
isFeature: true,
default: false,
controller: new ReloadOnChangeController(),
},
"feature_login_with_qr": {
supportedLevels: [SettingLevel.CONFIG],
labsGroup: LabGroup.Ui,
@@ -173,10 +173,7 @@ export class RoomListStoreV3Class extends AsyncStoreWithClient<EmptyObject> {
public getSortedRoomsInActiveSpace(filterKeys?: FilterKey[]): RoomsResult {
const spaceId = SpaceStore.instance.activeSpace;
const areSectionsEnabled = SettingsStore.getValue("feature_room_list_sections");
const sections = areSectionsEnabled
? this.getSections(filterKeys)
: [{ tag: CHATS_TAG, rooms: Array.from(this.roomSkipList?.getRoomsInActiveSpace(filterKeys) ?? []) }];
const sections = this.getSections(filterKeys);
return {
spaceId: spaceId,
@@ -243,9 +243,7 @@ export class RoomListHeaderViewModel
};
public onReleaseAnnouncementChanged = (): void => {
const isSectionFeatureEnabled = SettingsStore.getValue("feature_room_list_sections");
const displaySectionReleaseAnnouncement =
isSectionFeatureEnabled &&
ReleaseAnnouncementStore.instance.getReleaseAnnouncement() === "room_list_section";
this.snapshot.merge({ displaySectionReleaseAnnouncement });
};
@@ -310,35 +308,27 @@ function computeHeaderSpaceState(
spaceStore: SpaceStoreClass,
matrixClient: MatrixClient,
): Omit<RoomListHeaderViewSnapshot, "activeSortOption" | "isMessagePreviewEnabled"> {
const isSectionFeatureEnabled = SettingsStore.getValue("feature_room_list_sections");
const displaySectionReleaseAnnouncement =
isSectionFeatureEnabled && ReleaseAnnouncementStore.instance.getReleaseAnnouncement() === "room_list_section";
ReleaseAnnouncementStore.instance.getReleaseAnnouncement() === "room_list_section";
const activeSpace = spaceStore.activeSpaceRoom;
const title = getHeaderTitle(spaceStore);
const canCreateRoom = hasCreateRoomRights(matrixClient, activeSpace);
const canCreateVideoRoom = getCanCreateVideoRoom(canCreateRoom);
const displayComposeMenu = isSectionFeatureEnabled || canCreateRoom;
const displaySpaceMenu = Boolean(activeSpace);
const canInviteInSpace = Boolean(
activeSpace?.getJoinRule() === JoinRule.Public || activeSpace?.canInvite(matrixClient.getSafeUserId()),
);
const canAccessSpaceSettings = Boolean(activeSpace && shouldShowSpaceSettings(activeSpace));
const useComposeIcon = !isSectionFeatureEnabled;
const canCreateSection = isSectionFeatureEnabled;
return {
title,
canCreateRoom,
canCreateVideoRoom,
displayComposeMenu,
displaySpaceMenu,
canInviteInSpace,
canAccessSpaceSettings,
canCreateSection,
useComposeIcon,
displaySectionReleaseAnnouncement,
};
}
@@ -288,10 +288,8 @@ export class RoomListItemViewModel
const callType =
call?.callType === CallType.Voice ? "voice" : call?.callType === CallType.Video ? "video" : undefined;
const canMoveToSection = SettingsStore.getValue("feature_room_list_sections");
// Build sections list for the "Move to section" submenu
const sections: Section[] = canMoveToSection ? RoomListItemViewModel.buildSections(roomTags) : [];
const sections: Section[] = RoomListItemViewModel.buildSections(roomTags);
return {
id: room.roomId,
@@ -320,7 +318,6 @@ export class RoomListItemViewModel
canMarkAsRead,
canMarkAsUnread,
roomNotifState,
canMoveToSection,
sections,
};
}
@@ -40,7 +40,6 @@ import { keepIfSame } from "../../utils/keepIfSame";
import { DefaultTagID } from "../../stores/room-list-v3/skip-list/tag";
import { RoomListSectionHeaderViewModel } from "./RoomListSectionHeaderViewModel";
import { getCustomSectionData, isCustomSectionTag, CHATS_TAG } from "../../stores/room-list-v3/section";
import SettingsStore from "../../settings/SettingsStore";
import { tagRoom } from "../../utils/room/tagRoom";
import { getSectionTagForRoom } from "../../utils/room/getSectionTagForRoom";
@@ -64,10 +63,8 @@ const filterKeyToIdMap: Map<FilterEnum, FilterId> = new Map([
[FilterEnum.UnreadFilter, "unread"],
[FilterEnum.PeopleFilter, "people"],
[FilterEnum.RoomsFilter, "rooms"],
[FilterEnum.FavouriteFilter, "favourite"],
[FilterEnum.MentionsFilter, "mentions"],
[FilterEnum.InvitesFilter, "invites"],
[FilterEnum.LowPriorityFilter, "low_priority"],
]);
const TAG_TO_TITLE_MAP: Record<string, string> = {
@@ -146,11 +143,7 @@ export class RoomListViewModel
const roomsResult = RoomListStoreV3.instance.getSortedRoomsInActiveSpace(undefined);
const canCreateRoom = hasCreateRoomRights(props.client, activeSpace);
// Remove favourite and low priority filters if sections are enabled, as they are redundant with the sections
const areSectionsEnabled = SettingsStore.getValue("feature_room_list_sections");
const filterIds = [...filterKeyToIdMap.values()].filter(
(id) => !areSectionsEnabled || (id !== "favourite" && id !== "low_priority"),
);
const filterIds = [...filterKeyToIdMap.values()];
// By default, all sections are expanded
const { sections, isFlatList } = computeSections(roomsResult, (tag) => true);
@@ -756,8 +749,8 @@ export class RoomListViewModel
* @param isFlatList - Whether the room list is currently displayed as a flat list
*/
private notifyCollapseState(isFlatList: boolean): void {
// Hide collapse/expand all button if sections are disabled or if it's a flat list
if (!SettingsStore.getValue("feature_room_list_sections") || isFlatList) {
// Hide collapse/expand all button if it's a flat list
if (isFlatList) {
dispatcher.dispatch<RoomListSectionsCollapseStateChangedPayload>({
action: Action.RoomListSectionsCollapseStateChanged,
collapseSections: undefined,