Skip to content

Commit

Permalink
Add padding to room header icon (#29271)
Browse files Browse the repository at this point in the history
* Add padding to room header icon

* Add screenshot tests for room header icon

* Add type to visibility import

* Use visibility type

* lint
  • Loading branch information
langleyd authored Feb 21, 2025
1 parent 3470182 commit 2e1798e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions playwright/e2e/room/room-header.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Please see LICENSE files in the repository root for full details.
*/

import { type Page } from "@playwright/test";
import { type Visibility } from "matrix-js-sdk/src/matrix";

import { test, expect } from "../../element-web-test";
import { type ElementAppPage } from "../../pages/ElementAppPage";
Expand Down Expand Up @@ -85,6 +86,15 @@ test.describe("Room Header", () => {
await expect(header).toMatchScreenshot("room-header-long-name.png");
},
);

test("should render room header icon correctly", { tag: "@screenshot" }, async ({ page, app, user }) => {
await app.client.createRoom({ name: "Test Room", visibility: "public" as Visibility });
await app.viewRoomByName("Test Room");

const header = page.locator(".mx_RoomHeader");

await expect(header).toMatchScreenshot("room-header-with-icon.png");
});
});

test.describe("with a video room", () => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions res/css/views/rooms/_RoomHeader.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Please see LICENSE files in the repository root for full details.

.mx_RoomHeader_icon {
flex-shrink: 0;
padding: var(--cpd-space-1x);
}

.mx_RoomHeader .mx_FacePile {
Expand Down

0 comments on commit 2e1798e

Please sign in to comment.