✨ Enable WASM text editor with render-wasm (#11936)

When render-wasm/v1 is active, also enable text-editor-wasm/v1 so
the WASM text editor turns on with the renderer. Keep forcing
text-editor/v2 as before; the viewport still prefers the WASM
editor when both features are set. Classic unchanged.

Closes #11934
Relates to #11935
This commit is contained in:
Alejandro Alonso 2026-09-28 12:44:15 +02:00 committed by GitHub
parent 41e4ca4869
commit 18c9108d47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 32 deletions

View File

@ -288,34 +288,6 @@ test.skip("Update text letter spacing selecting a part of it (starting)", async
await expect(workspace.canvas).toHaveScreenshot();
});
test("BUG 11552 - Apply styles to the current caret", async ({ page }) => {
const workspace = new WasmWorkspacePage(page);
await workspace.setupEmptyFile();
await workspace.mockGetFile("text-editor/get-file-11552.json");
await workspace.mockRPC(
"update-file?id=*",
"text-editor/update-file-11552.json",
);
await workspace.goToWorkspace();
await workspace.doubleClickLeafLayer("Lorem ipsum");
const fontSizeInput = workspace.rightSidebar.getByRole("textbox", {
name: "Font Size",
});
await expect(fontSizeInput).toBeVisible();
await page.keyboard.press("Enter");
await page.keyboard.press("ArrowRight");
await fontSizeInput.fill("36");
await workspace.clickLeafLayer("Lorem ipsum");
// display Mixed placeholder
await expect(fontSizeInput).toHaveValue("");
await expect(fontSizeInput).toHaveAttribute("placeholder", "Mixed");
});
// This is to prevent QA tests from failing due to playwright
// considering 0-width text boxes as invisible
test("BUG 14098 - Fix text editor having 0 width or height", async ({ page }) => {
@ -328,7 +300,7 @@ test("BUG 14098 - Fix text editor having 0 width or height", async ({ page }) =>
await workspace.textShapeButton.click();
await workspace.clickAt(200, 200);
const textEditor = workspace.page.locator(`div[class*="viewport"]`).first().getByRole('textbox').first();
const textEditor = workspace.page.getByTestId("text-editor-container");
await expect(textEditor).toBeVisible();
});

View File

@ -58,10 +58,11 @@
:else
features)]
;; The WASM renderer requires the v2 text editor (hard dependency).
;; Ensure it's always enabled whenever render-wasm/v1 is active.
;; The WASM renderer uses the WASM text editor (v3). Keep forcing
;; text-editor/v2 as before; the viewport prefers wasm when both are on.
;; Classic clears both editor features (SVG v1).
(if (contains? features "render-wasm/v1")
(conj features "text-editor/v2")
(conj features "text-editor/v2" "text-editor-wasm/v1")
(disj features "text-editor/v2" "text-editor-wasm/v1"))))
(defn get-enabled-features