diff --git a/playwright/e2e/composer/CIDER.spec.ts b/playwright/e2e/composer/CIDER.spec.ts index af6843f89a1..55cb84f37a5 100644 --- a/playwright/e2e/composer/CIDER.spec.ts +++ b/playwright/e2e/composer/CIDER.spec.ts @@ -168,5 +168,19 @@ test.describe("Composer", () => { await composer.press("Enter"); await expect(page.locator(".mx_EventTile_body", { hasText: "Bob" })).toBeVisible(); }); + + test("renders emoji autocomplete", { tag: "@screenshot" }, async ({ page }) => { + const composer = page.getByRole("textbox", { name: "Send an unencrypted message…" }); + + // Type ":+1" to trigger emoji autocomplete + await composer.pressSequentially(":+1"); + + // Wait for autocomplete to appear + const autocomplete = page.locator("#mx_Autocomplete"); + await expect(autocomplete).toBeVisible(); + + // Take a screenshot of the autocomplete + await expect(autocomplete).toMatchScreenshot("emoji-autocomplete.png"); + }); }); }); diff --git a/playwright/snapshots/composer/CIDER.spec.ts/emoji-autocomplete-linux.png b/playwright/snapshots/composer/CIDER.spec.ts/emoji-autocomplete-linux.png new file mode 100644 index 00000000000..94c7ec42c80 Binary files /dev/null and b/playwright/snapshots/composer/CIDER.spec.ts/emoji-autocomplete-linux.png differ diff --git a/res/css/structures/_RoomView.pcss b/res/css/structures/_RoomView.pcss index eab4c3252d6..03f95020da1 100644 --- a/res/css/structures/_RoomView.pcss +++ b/res/css/structures/_RoomView.pcss @@ -76,6 +76,8 @@ Please see LICENSE files in the repository root for full details. flex-direction: column; flex: 1; min-width: 0; + container-type: size; + container-name: roomview; .mx_RoomView_messagePanel, .mx_RoomView_messagePanelSpinner, diff --git a/res/css/views/rooms/_Autocomplete.pcss b/res/css/views/rooms/_Autocomplete.pcss index fe5d999fa60..7070304bf11 100644 --- a/res/css/views/rooms/_Autocomplete.pcss +++ b/res/css/views/rooms/_Autocomplete.pcss @@ -65,7 +65,12 @@ margin: 12px; height: 100%; overflow-y: scroll; - max-height: 35vh; +} + +@container roomview (height >= 0px) { + .mx_Autocomplete_Completion_container_pill { + max-height: 40cqh; + } } .mx_Autocomplete_Completion_container_truncate {