mirror of https://github.com/vector-im/riot-web
Hide the archived section (#12286)
* Hide the archived section * Only add archived section if necessary * Update e2e testspull/28217/head
parent
179d2a767e
commit
28f7aac9a5
|
@ -227,8 +227,8 @@ test.describe("Knock Into Room", () => {
|
||||||
await expect(roomPreviewBar.getByRole("button", { name: "Request access" })).toBeVisible();
|
await expect(roomPreviewBar.getByRole("button", { name: "Request access" })).toBeVisible();
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole("group", { name: "Historical" }).getByRole("treeitem", { name: "Cybersecurity" }),
|
page.getByRole("group", { name: "Rooms" }).getByRole("treeitem", { name: "Cybersecurity" }),
|
||||||
).toBeVisible();
|
).not.toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
test("should knock into the room then knock is cancelled by another user and room is forgotten", async ({
|
test("should knock into the room then knock is cancelled by another user and room is forgotten", async ({
|
||||||
|
|
|
@ -43,8 +43,8 @@ test.describe("1:1 chat room", () => {
|
||||||
|
|
||||||
// wait till the room was left
|
// wait till the room was left
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole("group", { name: "Historical" }).locator(".mx_RoomTile").getByText(user2.displayName),
|
page.getByRole("group", { name: "Rooms" }).locator(".mx_RoomTile").getByText(user2.displayName),
|
||||||
).toBeVisible();
|
).not.toBeVisible();
|
||||||
|
|
||||||
// open new 1:1 chat room
|
// open new 1:1 chat room
|
||||||
await page.goto(`/#/user/${user2.userId}?action=chat`);
|
await page.goto(`/#/user/${user2.userId}?action=chat`);
|
||||||
|
|
|
@ -87,7 +87,10 @@ export const TAG_ORDER: TagID[] = [
|
||||||
DefaultTagID.LowPriority,
|
DefaultTagID.LowPriority,
|
||||||
DefaultTagID.ServerNotice,
|
DefaultTagID.ServerNotice,
|
||||||
DefaultTagID.Suggested,
|
DefaultTagID.Suggested,
|
||||||
DefaultTagID.Archived,
|
// DefaultTagID.Archived isn't here any more: we don't show it at all.
|
||||||
|
// The section still exists in the code as a place for rooms that we know
|
||||||
|
// about but aren't joined. At some point it could be removed entirely
|
||||||
|
// but we'd have to make sure that rooms you weren't in were hidden.
|
||||||
];
|
];
|
||||||
const ALWAYS_VISIBLE_TAGS: TagID[] = [DefaultTagID.DM, DefaultTagID.Untagged];
|
const ALWAYS_VISIBLE_TAGS: TagID[] = [DefaultTagID.DM, DefaultTagID.Untagged];
|
||||||
|
|
||||||
|
|
|
@ -498,6 +498,8 @@ export class Algorithm extends EventEmitter {
|
||||||
newTags[DefaultTagID.Invite].push(room);
|
newTags[DefaultTagID.Invite].push(room);
|
||||||
}
|
}
|
||||||
for (const room of memberships[EffectiveMembership.Leave]) {
|
for (const room of memberships[EffectiveMembership.Leave]) {
|
||||||
|
// We may not have had an archived section previously, so make sure its there.
|
||||||
|
if (newTags[DefaultTagID.Archived] === undefined) newTags[DefaultTagID.Archived] = [];
|
||||||
newTags[DefaultTagID.Archived].push(room);
|
newTags[DefaultTagID.Archived].push(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue