Update Compound to fix tooltips (#34083)

* Update Compound to fix tooltips

and add regression test

* Update snapshot
This commit is contained in:
Michael Telatynski
2026-07-02 07:51:56 +00:00
committed by GitHub
parent 4dab5da60e
commit 82e3423be2
5 changed files with 60 additions and 7 deletions
+21 -1
View File
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/
import { rejectToast } from "@element-hq/element-web-playwright-common";
import { assertNoToasts, rejectToast } from "@element-hq/element-web-playwright-common";
import type { Locator, Page } from "@playwright/test";
import { test, expect } from "../../element-web-test";
@@ -405,6 +405,26 @@ test.describe("Spaces", () => {
);
});
test("should render render tooltip on focus of metaspace", { tag: "@screenshot" }, async ({ page, user }) => {
await rejectToast(page, "Verify this device");
await rejectToast(page, "Notifications");
// Wait for toasts to clear otherwise they will mess with our screenshot
await assertNoToasts(page);
await page.getByRole("tree", { name: "Spaces" }).getByRole("button", { name: "Home" }).hover();
await expect(page.getByRole("tooltip", { name: "Home" })).toBeVisible();
await expect(page).toMatchScreenshot("space-panel-home-tooltip.png", {
showTooltips: true,
clip: {
x: 0,
y: 60,
width: 140,
height: 60,
},
});
});
test.describe("Should hide public spaces option if not allowed", () => {
test.use({
config: {
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@@ -2,7 +2,7 @@
exports[`ReadReceiptGroup <ReadReceiptPerson /> should display a tooltip 1`] = `
<div
class="_tooltip_1nqnq_8 _invisible_1nqnq_21"
class="_tooltip_1nqnq_8"
data-floating-ui-focusable=""
id="react-use-id-1"
role="tooltip"
+37 -4
View File
@@ -215,8 +215,8 @@ catalogs:
specifier: 10.2.1
version: 10.2.1
'@vector-im/compound-web':
specifier: 9.7.0
version: 9.7.0
specifier: 9.7.1
version: 9.7.1
'@vitejs/plugin-react':
specifier: 6.0.2
version: 6.0.2
@@ -542,7 +542,7 @@ importers:
version: 10.2.1(@types/react@19.2.14)(react@19.2.7)
'@vector-im/compound-web':
specifier: 'catalog:'
version: 9.7.0(@fontsource/inconsolata@5.2.8)(@fontsource/inter@5.2.8)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(@vector-im/compound-design-tokens@10.2.1(@types/react@19.2.14)(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
version: 9.7.1(@fontsource/inconsolata@5.2.8)(@fontsource/inter@5.2.8)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(@vector-im/compound-design-tokens@10.2.1(@types/react@19.2.14)(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
'@vector-im/matrix-wysiwyg':
specifier: 2.40.0
version: 2.40.0(patch_hash=7bdf6150f2905bc2f055a6bcaa7b9d78fa7ffde82e800bcc454ac7b0096bd65e)(react@19.2.7)
@@ -1543,7 +1543,7 @@ importers:
version: 8.62.0(eslint@8.57.1)(typescript@6.0.3)
'@vector-im/compound-web':
specifier: 'catalog:'
version: 9.7.0(@fontsource/inconsolata@5.2.8)(@fontsource/inter@5.2.8)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(@vector-im/compound-design-tokens@10.2.1(@types/react@19.2.14)(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
version: 9.7.1(@fontsource/inconsolata@5.2.8)(@fontsource/inter@5.2.8)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(@vector-im/compound-design-tokens@10.2.1(@types/react@19.2.14)(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
'@vitejs/plugin-react':
specifier: 'catalog:'
version: 6.0.2(vite@8.0.16(@types/node@25.9.3)(esbuild@0.27.4)(jiti@2.7.0)(sugarss@5.0.1(postcss@8.5.15))(terser@5.48.0)(yaml@2.8.4))
@@ -6417,6 +6417,18 @@ packages:
'@types/react':
optional: true
'@vector-im/compound-web@9.7.1':
resolution: {integrity: sha512-kR2lJTeudadPYPH9eeZLX+iO+5yEUihb3idp2IH4NDvm0/0W1l1Ok3ljoIcf0W74V2piyiNu4jME2Byy4byosg==}
peerDependencies:
'@fontsource/inconsolata': ^5
'@fontsource/inter': ^5
'@types/react': ^19.2.10
'@vector-im/compound-design-tokens': '>=1.6.1 <11.0.0'
react: ^18 || ^19.0.0
peerDependenciesMeta:
'@types/react':
optional: true
'@vector-im/matrix-wysiwyg@2.40.0':
resolution: {integrity: sha512-8LRFLs5PEKYs4lOL7aJ4lL/hGCrvEvOYkCR3JggXYXDVMtX4LmfdlKYucSAe98pCmqAAbLRvlRcR1bTOYvM8ug==}
peerDependencies:
@@ -19189,6 +19201,27 @@ snapshots:
- '@types/react-dom'
- react-dom
'@vector-im/compound-web@9.7.1(@fontsource/inconsolata@5.2.8)(@fontsource/inter@5.2.8)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(@vector-im/compound-design-tokens@10.2.1(@types/react@19.2.14)(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)':
dependencies:
'@floating-ui/react': 0.27.17(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
'@fontsource/inconsolata': 5.2.8
'@fontsource/inter': 5.2.8
'@radix-ui/react-context-menu': 2.2.16(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
'@radix-ui/react-dropdown-menu': 2.1.16(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
'@radix-ui/react-form': 0.1.8(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
'@radix-ui/react-progress': 1.1.8(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
'@radix-ui/react-separator': 1.1.8(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
'@radix-ui/react-slot': 1.2.4(@types/react@19.2.14)(react@19.2.7)
'@vector-im/compound-design-tokens': 10.2.1(@types/react@19.2.14)(react@19.2.7)
classnames: 2.5.1
react: 19.2.7
vaul: 1.1.2(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
optionalDependencies:
'@types/react': 19.2.14
transitivePeerDependencies:
- '@types/react-dom'
- react-dom
'@vector-im/matrix-wysiwyg@2.40.0(patch_hash=7bdf6150f2905bc2f055a6bcaa7b9d78fa7ffde82e800bcc454ac7b0096bd65e)(react@19.2.7)':
dependencies:
react: 19.2.7
+1 -1
View File
@@ -23,7 +23,7 @@ catalog:
"playwright-core": 1.61.1
# Compound
"@vector-im/compound-design-tokens": 10.2.1
"@vector-im/compound-web": 9.7.0
"@vector-im/compound-web": 9.7.1
# i18n
matrix-web-i18n: 3.6.0
# fonts