Ensure interface gradually reduces visible buttons when viewport shrinks (#33477)

* Rewrite Measured to be a functional component

* Add tests to cover narrow viewports

* lint

* breakpoint is optional

* Cleanup

* Provide default value

* Fixup

* fix two snaps

* Update screenshot

* and the other one

* unfake CIDER

* Update snaps AGAIN
This commit is contained in:
Will Hunt
2026-05-14 15:15:43 +00:00
committed by GitHub
parent cff2c4cd25
commit ab904bb6ca
16 changed files with 66 additions and 51 deletions
@@ -216,6 +216,12 @@ test.describe("Composer", () => {
await expect(page.locator(".mx_ImageBody")).toBeVisible();
});
test("renders in narrow viewports", { tag: "@screenshot" }, async ({ page, bot, app }) => {
// Shrink the viewport
await page.setViewportSize({ width: 750, height: 1080 });
await expect(page.locator(".mx_MessageComposer_wrapper")).toMatchScreenshot("narrow.png");
});
test.describe("when Control+Enter is required to send", () => {
test.beforeEach(async ({ app }) => {
await app.settings.setValue("MessageComposerInput.ctrlEnterToSend", null, SettingLevel.ACCOUNT, true);