RoomList: add back Favourites and Low Priority filters when sections are disabled (#34162)

* Add back Favourites and Low Priority filter into shared components

* Wireup RoomList.showSections and filters in room list vm

* Add e2e test for filters and showSection setting
This commit is contained in:
Florian Duros
2026-07-09 10:25:45 +00:00
committed by GitHub
parent 707d5a4353
commit f21a3f5413
6 changed files with 155 additions and 2 deletions
@@ -148,7 +148,9 @@
"expand_all_sections": "Expand all sections",
"expand_filters": "Expand filter list",
"filters": {
"favourite": "Favourites",
"invites": "Invites",
"low_priority": "Low priority",
"mentions": "Mentions",
"people": "People",
"rooms": "Rooms",
@@ -26,10 +26,14 @@ const filterIdToLabel = (filterId: FilterId): string => {
return _t("room_list|filters|people");
case "rooms":
return _t("room_list|filters|rooms");
case "favourite":
return _t("room_list|filters|favourite");
case "mentions":
return _t("room_list|filters|mentions");
case "invites":
return _t("room_list|filters|invites");
case "low_priority":
return _t("room_list|filters|low_priority");
}
};
@@ -11,7 +11,7 @@ import { useEffect, useState } from "react";
* Standard filter identifiers that can be used across implementations.
* These are stable keys - the view layer maps them to translated labels.
*/
export type FilterId = "unread" | "people" | "rooms" | "mentions" | "invites";
export type FilterId = "unread" | "people" | "rooms" | "favourite" | "mentions" | "invites" | "low_priority";
/**
* A hook to sort the filter IDs by active state.