style(webui): refine Markdown reading typography (#6568)

* style(webui): refine Markdown reading typography

* fix(webui): stabilize composer and typography checks
This commit is contained in:
chengyongru authored and GitHub committed 2026-11-05 15:54:17 +08:00
1 parent 0c92d5bb03
commit e6127aa324
17 files changed
+307 -100

No files matched your search

+2 -3
View File
@@ -117,9 +117,9 @@ test("multiline drafts resize after reading typography changes", async ({ page }
await input.fill("First line\nSecond line\nThird line");
const standardHeight = await input.evaluate(node => node.clientHeight);
const sizes = [
["large", "Large reading text", 20],
["large", "Large reading text", 18],
["small", "Small reading text", 16],
["standard", "Standard reading text", 18],
["standard", "Standard reading text", 16],
] as const;
for (const [size, label, fontSize] of sizes) {
await page.getByRole("radio", { name: label, exact: true }).click();
@@ -128,7 +128,6 @@ test("multiline drafts resize after reading typography changes", async ({ page }
expect(await input.evaluate(node => node.scrollHeight <= node.clientHeight + 1)).toBe(true);
const height = await input.evaluate(node => node.clientHeight);
if (size === "large") expect(height).toBeGreaterThan(standardHeight);
else if (size === "small") expect(height).toBeLessThan(standardHeight);
else expect(height).toBe(standardHeight);
}
});