fix(downloads): the failure link keeps the 24px floor on a mouse (E28 S3g)

The S3g measure found the row's failure link 20px tall (the meta line's
text height): DESIGN B1 puts nothing under 24. Coarse pointers already
grew it to 44.
This commit is contained in:
2026-09-27 05:13:32 +02:00
parent 6c2c01e67b
commit 2c65edfffd
2 changed files with 10 additions and 1 deletions
@@ -196,6 +196,15 @@ describe("DownloadRow · narrow", () => {
expect(foot.className).toContain(c);
});
it("gives the failure link a real 24px line on a mouse, not the text's 20 (DESIGN B1, S3g)", () => {
render(
<DownloadRow job={{ ...baseJob, status: "error", error: "boom" }} onShowError={() => {}} />,
);
const link = screen.getByTitle("downloads.errors.fail.title");
const cls = link.className.split(/\s+/);
expect(cls).toEqual(expect.arrayContaining(["inline-block", "min-h-6", "leading-6"]));
});
it("draws nothing for an empty link list (a bare 0 once leaked into the row)", () => {
const { container } = render(<DownloadRow job={{ ...withAsset("mp4"), extra_links: [] }} />);
const walker = document.createTreeWalker(container, NodeFilter.SHOW_TEXT);
+1 -1
View File
@@ -286,7 +286,7 @@ export function DownloadRow({
{" "}
<Pressable
onClick={() => onShowError?.(job)}
className="text-danger inline-block leading-5 min-h-5 touch-target pointer-coarse:leading-(--touch-target)"
className="text-danger inline-block leading-6 min-h-6 touch-target pointer-coarse:leading-(--touch-target)"
title={t("downloads.errors.fail.title")}
>
· {t(failCopyKeys(job, "short"))}{" "}