-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement new memberlist design with MVVM architecture (#28874)
* Add new e2e icon for the member tile * Add new presence icon for member tile * Implement new member tile * Implement memberlist view model * Implement new memberlist header view * Support the new memberlist in Diasambiguated profile 1. Use MemberInfo instead of RoomMember 2. CSS changes to reflect the new design * Implement new memberlist view * Add and use a new overflow component We used the EntityTile component as a pretend overflow tile in some places. This new lighter component is added so that we can remove the complex EntityTile component. * Remove old code * Add/remove css files from _components.pcss * Increase minimum width as per design * Actually use the new memberlist view * Fix broken jest tests * Add jest tests * Playwright: Make it possible to disable presence * Add playwright tests * Fix lint error * Undo translation changes that must be done via localazy * Update license header * Use waitFor instead of setTimeout * Remove comment * Switch over from template to container hs * Revert unintended change * Move config to top level
- Loading branch information
1 parent
f1899b9
commit ebef0d3
Showing
57 changed files
with
2,456 additions
and
1,788 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
Copyright 2024 New Vector Ltd. | ||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial | ||
Please see LICENSE files in the repository root for full details. | ||
*/ | ||
|
||
import { test, expect } from "../../element-web-test"; | ||
import { Bot } from "../../pages/bot"; | ||
|
||
const ROOM_NAME = "Test room"; | ||
const NAME = "Alice"; | ||
|
||
test.use({ | ||
synapseConfigOptions: { | ||
presence: { | ||
enabled: false, | ||
include_offline_users_on_sync: false, | ||
}, | ||
}, | ||
displayName: NAME, | ||
disablePresence: true, | ||
}); | ||
|
||
test.describe("Memberlist", () => { | ||
test.beforeEach(async ({ app, user, page, homeserver }, testInfo) => { | ||
testInfo.setTimeout(testInfo.timeout + 30_000); | ||
const id = await app.client.createRoom({ name: ROOM_NAME }); | ||
const newBots: Bot[] = []; | ||
const names = ["Bob", "Bob", "Susan"]; | ||
for (let i = 0; i < 3; i++) { | ||
const displayName = names[i]; | ||
const autoAcceptInvites = displayName !== "Susan"; | ||
const bot = new Bot(page, homeserver, { displayName, startClient: true, autoAcceptInvites }); | ||
await bot.prepareClient(); | ||
await app.client.inviteUser(id, bot.credentials?.userId); | ||
newBots.push(bot); | ||
} | ||
}); | ||
|
||
test("Renders correctly", { tag: "@screenshot" }, async ({ page, app }) => { | ||
await app.viewRoomByName(ROOM_NAME); | ||
const memberlist = await app.toggleMemberlistPanel(); | ||
await expect(memberlist.locator(".mx_MemberTileView")).toHaveCount(4); | ||
await expect(memberlist.getByText("(Invited)")).toHaveCount(1); | ||
await expect(page.locator(".mx_MemberListView")).toMatchScreenshot("with-four-members.png"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+17.5 KB
playwright/snapshots/right-panel/memberlist.spec.ts/with-four-members-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
Copyright 2024 New Vector Ltd. | ||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial | ||
Please see LICENSE files in the repository root for full details. | ||
*/ | ||
|
||
.mx_E2EIconView { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.mx_E2EIconView_warning { | ||
color: var(--cpd-color-icon-critical-primary); | ||
} | ||
|
||
.mx_E2EIconView_verified { | ||
color: var(--cpd-color-icon-success-primary); | ||
} |
Oops, something went wrong.