Skip to content

Commit 9642af9

Browse files
authored
Re-order primary filters (#29957)
* Re-order primary filters to match EX * Update tests * Update screenshots * Try to make screenshot deterministic * Just use the screenshot the CI spits out * Try again * Another screenshot
1 parent c309cc8 commit 9642af9

File tree

11 files changed

+8
-8
lines changed

11 files changed

+8
-8
lines changed

src/components/viewmodels/roomlist/useFilteredRooms.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ interface FilteredRooms {
4747

4848
const filterKeyToNameMap: Map<FilterKey, TranslationKey> = new Map([
4949
[FilterKey.UnreadFilter, _td("room_list|filters|unread")],
50-
[FilterKey.FavouriteFilter, _td("room_list|filters|favourite")],
5150
[FilterKey.PeopleFilter, _td("room_list|filters|people")],
5251
[FilterKey.RoomsFilter, _td("room_list|filters|rooms")],
52+
[FilterKey.FavouriteFilter, _td("room_list|filters|favourite")],
5353
]);
5454

5555
/**

test/unit-tests/components/viewmodels/roomlist/RoomListViewModel-test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ describe("RoomListViewModel", () => {
7373
// should have 4 filters
7474
expect(vm.current.primaryFilters).toHaveLength(4);
7575
// check the order
76-
for (const [i, name] of ["Unreads", "Favourites", "People", "Rooms"].entries()) {
76+
for (const [i, name] of ["Unreads", "People", "Rooms", "Favourites"].entries()) {
7777
expect(vm.current.primaryFilters[i].name).toEqual(name);
7878
expect(vm.current.primaryFilters[i].active).toEqual(false);
7979
}

test/unit-tests/components/views/rooms/RoomListPanel/__snapshots__/RoomListPanel-test.tsx.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ exports[`<RoomListPanel /> should not render the RoomListSearch component when U
8383
role="button"
8484
tabindex="0"
8585
>
86-
Favourites
86+
People
8787
</button>
8888
</li>
8989
<li
@@ -96,7 +96,7 @@ exports[`<RoomListPanel /> should not render the RoomListSearch component when U
9696
role="button"
9797
tabindex="0"
9898
>
99-
People
99+
Rooms
100100
</button>
101101
</li>
102102
<li
@@ -109,7 +109,7 @@ exports[`<RoomListPanel /> should not render the RoomListSearch component when U
109109
role="button"
110110
tabindex="0"
111111
>
112-
Rooms
112+
Favourites
113113
</button>
114114
</li>
115115
</ul>
@@ -338,7 +338,7 @@ exports[`<RoomListPanel /> should render the RoomListSearch component when UICom
338338
role="button"
339339
tabindex="0"
340340
>
341-
Favourites
341+
People
342342
</button>
343343
</li>
344344
<li
@@ -351,7 +351,7 @@ exports[`<RoomListPanel /> should render the RoomListSearch component when UICom
351351
role="button"
352352
tabindex="0"
353353
>
354-
People
354+
Rooms
355355
</button>
356356
</li>
357357
<li
@@ -364,7 +364,7 @@ exports[`<RoomListPanel /> should render the RoomListSearch component when UICom
364364
role="button"
365365
tabindex="0"
366366
>
367-
Rooms
367+
Favourites
368368
</button>
369369
</li>
370370
</ul>

0 commit comments

Comments
 (0)