Skip to content
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4bd9105
Move Room List to ListView
langleyd Jul 31, 2025
46ab9f2
Update rooms when the primary filter changes
langleyd Aug 6, 2025
61356cb
Fix stickyRow/scrollIntoView when switiching space or changing filters
langleyd Aug 7, 2025
b6857ce
Remove the rest of space/enter keyboard handling use
langleyd Aug 7, 2025
7295b90
Remove useCombinedRef and add @radix-ui/react-compose-refs as we alre…
langleyd Aug 7, 2025
a8675d9
Update RoomList unit test
langleyd Aug 7, 2025
4bb3a5b
Update snapshots and unit tests
langleyd Aug 7, 2025
531c48a
Fix e2e tests
langleyd Aug 7, 2025
a0f7d65
Remove react-virtualized from tests
langleyd Aug 7, 2025
2028106
Fix e2e flake
langleyd Aug 7, 2025
b59ef39
Update more screenshots
langleyd Aug 7, 2025
d1ffdc5
Fix e2e test case where were should scroll to the top when the active…
langleyd Aug 7, 2025
524f20c
Move from gitpkg to package-patch
langleyd Aug 8, 2025
436b9d1
Update to latest react virtuoso release/api.
langleyd Aug 11, 2025
521e1c1
Use listbox/option roles to improve ScreenReader experience
langleyd Aug 15, 2025
d98e61c
Change onKeyDown e.stopPropogation to cover context menu
langleyd Aug 15, 2025
fbb74b3
lint
langleyd Aug 15, 2025
1bd9d9f
Remove unneeded exposure of the listView ref
langleyd Aug 18, 2025
079fa90
Merge branch 'develop' of github.com:vector-im/element-web into langl…
langleyd Aug 18, 2025
f6b0666
Update unit test and snapshot
langleyd Aug 18, 2025
e913494
Fix e2e tests and update screenshots
langleyd Aug 18, 2025
6f6c0d4
Fix unit test and snapshot
langleyd Aug 18, 2025
d48e19c
Update more unit tests
langleyd Aug 18, 2025
4acb35a
Fix keyboard shortcuts and e2e test
langleyd Aug 18, 2025
ab90642
Fix another e2e and unit test
langleyd Aug 18, 2025
96df09a
lint
langleyd Aug 18, 2025
c4066d2
Improve the naming for RoomResult and the documentation on it's field…
langleyd Aug 20, 2025
0edfa0a
Put back and fix landmark tests
langleyd Aug 21, 2025
41b9db2
Merge branch 'develop' of github.com:vector-im/element-web into langl…
langleyd Aug 21, 2025
9d40fe0
Fix test import
langleyd Aug 21, 2025
3d45d88
Merge branch 'develop' into langley/use_list_view_with_room_list_rebased
langleyd Aug 21, 2025
801d6f2
Add comment regarding context object getting rendered.
langleyd Aug 21, 2025
d0e6ecc
onKeyDown should be optional
langleyd Aug 21, 2025
a99fe7f
Use SpaceKey type on RoomResult
langleyd Aug 21, 2025
6815eda
lint
langleyd Aug 21, 2025
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
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
"@matrix-org/spec": "^1.7.0",
"@sentry/browser": "^10.0.0",
"@types/png-chunks-extract": "^1.0.2",
"@types/react-virtualized": "^9.21.30",
"@vector-im/compound-design-tokens": "^6.0.0",
"@vector-im/compound-web": "^8.1.2",
"@vector-im/matrix-wysiwyg": "2.39.0",
Expand Down Expand Up @@ -153,8 +152,7 @@
"react-focus-lock": "^2.5.1",
"react-string-replace": "^1.1.1",
"react-transition-group": "^4.4.1",
"react-virtualized": "^9.22.5",
"react-virtuoso": "^4.12.6",
"react-virtuoso": "^4.14.0",
"rfc4648": "^1.4.0",
"sanitize-filename": "^1.6.3",
"sanitize-html": "2.17.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ test.describe("Room list filters and sort", () => {
So we expect 'Old Room' to show up in the room list.
*/
const roomListView = getRoomList(page);
const oldRoomTile = roomListView.getByRole("gridcell", { name: "Open room Old Room" });
const oldRoomTile = roomListView.getByRole("option", { name: "Open room Old Room" });
await expect(oldRoomTile).toBeVisible();

/*
Expand Down Expand Up @@ -139,8 +139,9 @@ test.describe("Room list filters and sort", () => {

// Open the non-favourite room
const roomListView = getRoomList(page);
const tile = roomListView.getByRole("gridcell", { name: "Open room room-non-fav" });
await tile.scrollIntoViewIfNeeded();
const tile = roomListView.getByRole("option", { name: "Open room room-non-fav" });
// item may not be in the DOM using scrollListToBottom rather than scrollIntoViewIfNeeded
await app.scrollListToBottom(roomListView);
await tile.click();

// Enable Favourite filter
Expand All @@ -151,7 +152,7 @@ test.describe("Room list filters and sort", () => {

// Ensure the room list is not scrolled
const isScrolledDown = await page
.getByRole("grid", { name: "Room list" })
.getByRole("listbox", { name: "Room list", exact: true })
.evaluate((e) => e.scrollTop !== 0);
expect(isScrolledDown).toStrictEqual(false);
});
Expand Down Expand Up @@ -227,37 +228,37 @@ test.describe("Room list filters and sort", () => {

await primaryFilters.getByRole("option", { name: "Unread" }).click();
// only one room should be visible
await expect(roomList.getByRole("gridcell", { name: "unread dm" })).toBeVisible();
await expect(roomList.getByRole("gridcell", { name: "unread room" })).toBeVisible();
await expect.poll(() => roomList.locator("role=gridcell").count()).toBe(4);
await expect(roomList.getByRole("option", { name: "unread dm" })).toBeVisible();
await expect(roomList.getByRole("option", { name: "unread room" })).toBeVisible();
await expect.poll(() => roomList.locator("role=option").count()).toBe(4);
await expect(primaryFilters).toMatchScreenshot("unread-primary-filters.png");

await primaryFilters.getByRole("option", { name: "People" }).click();
await expect(roomList.getByRole("gridcell", { name: "unread dm" })).toBeVisible();
await expect(roomList.getByRole("gridcell", { name: "invited room" })).toBeVisible();
await expect.poll(() => roomList.locator("role=gridcell").count()).toBe(2);
await expect(roomList.getByRole("option", { name: "unread dm" })).toBeVisible();
await expect(roomList.getByRole("option", { name: "invited room" })).toBeVisible();
await expect.poll(() => roomList.locator("role=option").count()).toBe(2);

await primaryFilters.getByRole("option", { name: "Rooms" }).click();
await expect(roomList.getByRole("gridcell", { name: "unread room" })).toBeVisible();
await expect(roomList.getByRole("gridcell", { name: "favourite room" })).toBeVisible();
await expect(roomList.getByRole("gridcell", { name: "empty room" })).toBeVisible();
await expect(roomList.getByRole("gridcell", { name: "room with mention" })).toBeVisible();
await expect(roomList.getByRole("gridcell", { name: "Low prio room" })).toBeVisible();
await expect.poll(() => roomList.locator("role=gridcell").count()).toBe(5);
await expect(roomList.getByRole("option", { name: "unread room" })).toBeVisible();
await expect(roomList.getByRole("option", { name: "favourite room" })).toBeVisible();
await expect(roomList.getByRole("option", { name: "empty room" })).toBeVisible();
await expect(roomList.getByRole("option", { name: "room with mention" })).toBeVisible();
await expect(roomList.getByRole("option", { name: "Low prio room" })).toBeVisible();
await expect.poll(() => roomList.locator("role=option").count()).toBe(5);

await getFilterExpandButton(page).click();

await primaryFilters.getByRole("option", { name: "Favourite" }).click();
await expect(roomList.getByRole("gridcell", { name: "favourite room" })).toBeVisible();
await expect.poll(() => roomList.locator("role=gridcell").count()).toBe(1);
await expect(roomList.getByRole("option", { name: "favourite room" })).toBeVisible();
await expect.poll(() => roomList.locator("role=option").count()).toBe(1);

await primaryFilters.getByRole("option", { name: "Mentions" }).click();
await expect(roomList.getByRole("gridcell", { name: "room with mention" })).toBeVisible();
await expect.poll(() => roomList.locator("role=gridcell").count()).toBe(1);
await expect(roomList.getByRole("option", { name: "room with mention" })).toBeVisible();
await expect.poll(() => roomList.locator("role=option").count()).toBe(1);

await primaryFilters.getByRole("option", { name: "Invites" }).click();
await expect(roomList.getByRole("gridcell", { name: "invited room" })).toBeVisible();
await expect.poll(() => roomList.locator("role=gridcell").count()).toBe(1);
await expect(roomList.getByRole("option", { name: "invited room" })).toBeVisible();
await expect.poll(() => roomList.locator("role=option").count()).toBe(1);

await getFilterCollapseButton(page).click();
await expect(primaryFilters.locator("role=option").first()).toHaveText("Invites");
Expand All @@ -268,6 +269,7 @@ test.describe("Room list filters and sort", () => {
{ tag: "@screenshot" },
async ({ page, app, bot }) => {
const roomListView = getRoomList(page);
const primaryFilters = getPrimaryFilters(page);

// Let's configure unread dm room so that we only get notification for mentions and keywords
await app.viewRoomById(unReadDmId);
Expand All @@ -276,20 +278,20 @@ test.describe("Room list filters and sort", () => {
await app.settings.closeDialog();

// Let's open a room other than unread room or unread dm
await roomListView.getByRole("gridcell", { name: "Open room favourite room" }).click();
await roomListView.getByRole("option", { name: "Open room favourite room" }).click();

// Let's make the bot send a new message in both rooms
await bot.sendMessage(unReadDmId, "Hello!");
await bot.sendMessage(unReadRoomId, "Hello!");

// Let's activate the unread filter now
await page.getByRole("option", { name: "Unread" }).click();
await primaryFilters.getByRole("option", { name: "Unread" }).click();

// Unread filter should only show unread room and not unread dm!
const unreadDm = roomListView.getByRole("gridcell", { name: "Open room unread room" });
const unreadDm = roomListView.getByRole("option", { name: "Open room unread room" });
await expect(unreadDm).toBeVisible();
await expect(unreadDm).toMatchScreenshot("unread-dm.png");
await expect(roomListView.getByRole("gridcell", { name: "Open room unread dm" })).not.toBeVisible();
await expect(roomListView.getByRole("option", { name: "Open room unread dm" })).not.toBeVisible();
},
);

Expand All @@ -299,15 +301,15 @@ test.describe("Room list filters and sort", () => {
await getRoomOptionsMenu(page).click();
await page.getByRole("menuitemradio", { name: "A-Z" }).click();

await expect(roomListView.getByRole("gridcell").first()).toHaveText(/empty room/);
await expect(roomListView.getByRole("option").first()).toHaveText(/empty room/);
});

test("should move room to the top on message when sorting by activity", async ({ page, bot }) => {
const roomListView = getRoomList(page);

await bot.sendMessage(unReadDmId, "Hello!");

await expect(roomListView.getByRole("gridcell").first()).toHaveText(/unread dm/);
await expect(roomListView.getByRole("option").first()).toHaveText(/unread dm/);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test.describe("Room list panel", () => {
test("should render the room list panel", { tag: "@screenshot" }, async ({ page, app, user }) => {
const roomListView = getRoomListView(page);
// Wait for the last room to be visible
await expect(roomListView.getByRole("gridcell", { name: "Open room room19" })).toBeVisible();
await expect(roomListView.getByRole("option", { name: "Open room room19" })).toBeVisible();
await expect(roomListView).toMatchScreenshot("room-list-panel.png");
});

Expand Down
Loading
Loading