Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
TAC: Fix hover state when expanded (#12337)
Browse files Browse the repository at this point in the history
* Fix TAC hover state

* Add playwright test

* Update playwright snapshot after last compound style changes
  • Loading branch information
florianduros authored Mar 14, 2024
1 parent 49be30b commit e309410
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions playwright/e2e/spaces/threads-activity-centre/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ export class Helpers {
return this.getTacButton().click();
}

/**
* Hover over the Threads Activity Centre button
*/
hoverTacButton() {
return this.getTacButton().hover();
}

/**
* Click on a room in the Threads Activity Centre
* @param name - room name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,14 @@ test.describe("Threads Activity Centre", () => {
await toggleSpotlight();
await expect(page.locator(".mx_SpotlightDialog")).not.toBeVisible();
});

test("should have the correct hover state", async ({ util, page }) => {
await util.hoverTacButton();
await expect(util.getSpacePanel()).toMatchScreenshot("tac-hovered.png");

// Expand the space panel, hover the button and take a screenshot
await util.expandSpacePanel();
await util.hoverTacButton();
await expect(util.getSpacePanel()).toMatchScreenshot("tac-hovered-expanded.png");
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions res/css/structures/_ThreadsActivityCentre.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
margin: 18px auto auto auto;

&.expanded {
/**
* override compound default background color when hovered
* should disappear when the space panel will be migrated to compound
*/
background-color: transparent !important;

/* align with settings icon */
margin-left: 21px;

Expand Down

0 comments on commit e309410

Please sign in to comment.