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
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |
@ -47,9 +47,9 @@ interface FilteredRooms {
|
|||||||
|
|
||||||
const filterKeyToNameMap: Map<FilterKey, TranslationKey> = new Map([
|
const filterKeyToNameMap: Map<FilterKey, TranslationKey> = new Map([
|
||||||
[FilterKey.UnreadFilter, _td("room_list|filters|unread")],
|
[FilterKey.UnreadFilter, _td("room_list|filters|unread")],
|
||||||
[FilterKey.FavouriteFilter, _td("room_list|filters|favourite")],
|
|
||||||
[FilterKey.PeopleFilter, _td("room_list|filters|people")],
|
[FilterKey.PeopleFilter, _td("room_list|filters|people")],
|
||||||
[FilterKey.RoomsFilter, _td("room_list|filters|rooms")],
|
[FilterKey.RoomsFilter, _td("room_list|filters|rooms")],
|
||||||
|
[FilterKey.FavouriteFilter, _td("room_list|filters|favourite")],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -73,7 +73,7 @@ describe("RoomListViewModel", () => {
|
|||||||
// should have 4 filters
|
// should have 4 filters
|
||||||
expect(vm.current.primaryFilters).toHaveLength(4);
|
expect(vm.current.primaryFilters).toHaveLength(4);
|
||||||
// check the order
|
// 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].name).toEqual(name);
|
||||||
expect(vm.current.primaryFilters[i].active).toEqual(false);
|
expect(vm.current.primaryFilters[i].active).toEqual(false);
|
||||||
}
|
}
|
||||||
|
@ -73,19 +73,6 @@ exports[`<RoomListPanel /> should not render the RoomListSearch component when U
|
|||||||
Unreads
|
Unreads
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li
|
|
||||||
aria-selected="false"
|
|
||||||
role="option"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
aria-selected="false"
|
|
||||||
class="_chat-filter_5qdp0_8"
|
|
||||||
role="button"
|
|
||||||
tabindex="0"
|
|
||||||
>
|
|
||||||
Favourites
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
<li
|
<li
|
||||||
aria-selected="false"
|
aria-selected="false"
|
||||||
role="option"
|
role="option"
|
||||||
@ -112,6 +99,19 @@ exports[`<RoomListPanel /> should not render the RoomListSearch component when U
|
|||||||
Rooms
|
Rooms
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
|
<li
|
||||||
|
aria-selected="false"
|
||||||
|
role="option"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
aria-selected="false"
|
||||||
|
class="_chat-filter_5qdp0_8"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
Favourites
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div
|
<div
|
||||||
aria-label="Secondary filters"
|
aria-label="Secondary filters"
|
||||||
@ -328,19 +328,6 @@ exports[`<RoomListPanel /> should render the RoomListSearch component when UICom
|
|||||||
Unreads
|
Unreads
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li
|
|
||||||
aria-selected="false"
|
|
||||||
role="option"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
aria-selected="false"
|
|
||||||
class="_chat-filter_5qdp0_8"
|
|
||||||
role="button"
|
|
||||||
tabindex="0"
|
|
||||||
>
|
|
||||||
Favourites
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
<li
|
<li
|
||||||
aria-selected="false"
|
aria-selected="false"
|
||||||
role="option"
|
role="option"
|
||||||
@ -367,6 +354,19 @@ exports[`<RoomListPanel /> should render the RoomListSearch component when UICom
|
|||||||
Rooms
|
Rooms
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
|
<li
|
||||||
|
aria-selected="false"
|
||||||
|
role="option"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
aria-selected="false"
|
||||||
|
class="_chat-filter_5qdp0_8"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
Favourites
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div
|
<div
|
||||||
aria-label="Secondary filters"
|
aria-label="Secondary filters"
|
||||||
|