Skip to content

Re-order primary filters #29957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 15, 2025
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/viewmodels/roomlist/useFilteredRooms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ interface FilteredRooms {

const filterKeyToNameMap: Map<FilterKey, TranslationKey> = new Map([
[FilterKey.UnreadFilter, _td("room_list|filters|unread")],
[FilterKey.FavouriteFilter, _td("room_list|filters|favourite")],
[FilterKey.PeopleFilter, _td("room_list|filters|people")],
[FilterKey.RoomsFilter, _td("room_list|filters|rooms")],
[FilterKey.FavouriteFilter, _td("room_list|filters|favourite")],
]);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe("RoomListViewModel", () => {
// should have 4 filters
expect(vm.current.primaryFilters).toHaveLength(4);
// check the order
for (const [i, name] of ["Unreads", "Favourites", "People", "Rooms"].entries()) {
for (const [i, name] of ["Unreads", "People", "Rooms", "Favourites"].entries()) {
expect(vm.current.primaryFilters[i].name).toEqual(name);
expect(vm.current.primaryFilters[i].active).toEqual(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ exports[`<RoomListPanel /> should not render the RoomListSearch component when U
role="button"
tabindex="0"
>
Favourites
People
</button>
</li>
<li
Expand All @@ -96,7 +96,7 @@ exports[`<RoomListPanel /> should not render the RoomListSearch component when U
role="button"
tabindex="0"
>
People
Rooms
</button>
</li>
<li
Expand All @@ -109,7 +109,7 @@ exports[`<RoomListPanel /> should not render the RoomListSearch component when U
role="button"
tabindex="0"
>
Rooms
Favourites
</button>
</li>
</ul>
Expand Down Expand Up @@ -338,7 +338,7 @@ exports[`<RoomListPanel /> should render the RoomListSearch component when UICom
role="button"
tabindex="0"
>
Favourites
People
</button>
</li>
<li
Expand All @@ -351,7 +351,7 @@ exports[`<RoomListPanel /> should render the RoomListSearch component when UICom
role="button"
tabindex="0"
>
People
Rooms
</button>
</li>
<li
Expand All @@ -364,7 +364,7 @@ exports[`<RoomListPanel /> should render the RoomListSearch component when UICom
role="button"
tabindex="0"
>
Rooms
Favourites
</button>
</li>
</ul>
Expand Down
Loading