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
This commit is contained in:
David Baker 2025-05-15 14:15:24 +01:00 committed by GitHub
parent c309cc8bfa
commit 9642af9930
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 28 additions and 28 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

View File

@ -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")],
]);
/**

View File

@ -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);
}

View File

@ -73,19 +73,6 @@ exports[`<RoomListPanel /> should not render the RoomListSearch component when U
Unreads
</button>
</li>
<li
aria-selected="false"
role="option"
>
<button
aria-selected="false"
class="_chat-filter_5qdp0_8"
role="button"
tabindex="0"
>
Favourites
</button>
</li>
<li
aria-selected="false"
role="option"
@ -112,6 +99,19 @@ exports[`<RoomListPanel /> should not render the RoomListSearch component when U
Rooms
</button>
</li>
<li
aria-selected="false"
role="option"
>
<button
aria-selected="false"
class="_chat-filter_5qdp0_8"
role="button"
tabindex="0"
>
Favourites
</button>
</li>
</ul>
<div
aria-label="Secondary filters"
@ -328,19 +328,6 @@ exports[`<RoomListPanel /> should render the RoomListSearch component when UICom
Unreads
</button>
</li>
<li
aria-selected="false"
role="option"
>
<button
aria-selected="false"
class="_chat-filter_5qdp0_8"
role="button"
tabindex="0"
>
Favourites
</button>
</li>
<li
aria-selected="false"
role="option"
@ -367,6 +354,19 @@ exports[`<RoomListPanel /> should render the RoomListSearch component when UICom
Rooms
</button>
</li>
<li
aria-selected="false"
role="option"
>
<button
aria-selected="false"
class="_chat-filter_5qdp0_8"
role="button"
tabindex="0"
>
Favourites
</button>
</li>
</ul>
<div
aria-label="Secondary filters"