Replace legacy Tooltips with Compound tooltips (#28231)

* Ditch legacy Tooltips in favour of Compound

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove dead code

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Extract markdown CodeBlock into React component

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Upgrade compound

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-10-18 15:57:39 +01:00 committed by GitHub
parent fad457362d
commit 26430a3a6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 410 additions and 670 deletions

View file

@ -263,7 +263,6 @@ test.describe("Editing", () => {
checkA11y,
}) => {
axe.disableRules("color-contrast"); // XXX: We have some known contrast issues here
axe.exclude(".mx_Tooltip_visible"); // XXX: this is fine but would be good to fix
await page.goto(`#/room/${room.roomId}`);

View file

@ -96,7 +96,7 @@ test.describe("Registration", () => {
});
});
await page.getByRole("textbox", { name: "Username", exact: true }).fill("_alice");
await expect(page.getByRole("alert").filter({ hasText: "Some characters not allowed" })).toBeVisible();
await expect(page.getByRole("tooltip").filter({ hasText: "Some characters not allowed" })).toBeVisible();
await page.route("**/_matrix/client/*/register/available?username=bob", async (route) => {
await route.fulfill({
@ -108,9 +108,9 @@ test.describe("Registration", () => {
});
});
await page.getByRole("textbox", { name: "Username", exact: true }).fill("bob");
await expect(page.getByRole("alert").filter({ hasText: "Someone already has that username" })).toBeVisible();
await expect(page.getByRole("tooltip").filter({ hasText: "Someone already has that username" })).toBeVisible();
await page.getByRole("textbox", { name: "Username", exact: true }).fill("foobar");
await expect(page.getByRole("alert")).not.toBeVisible();
await expect(page.getByRole("tooltip")).not.toBeVisible();
});
});