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:
@@ -196,6 +196,15 @@ describe("DownloadRow · narrow", () => {
|
|||||||
expect(foot.className).toContain(c);
|
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)", () => {
|
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 { container } = render(<DownloadRow job={{ ...withAsset("mp4"), extra_links: [] }} />);
|
||||||
const walker = document.createTreeWalker(container, NodeFilter.SHOW_TEXT);
|
const walker = document.createTreeWalker(container, NodeFilter.SHOW_TEXT);
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ export function DownloadRow({
|
|||||||
{" "}
|
{" "}
|
||||||
<Pressable
|
<Pressable
|
||||||
onClick={() => onShowError?.(job)}
|
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")}
|
title={t("downloads.errors.fail.title")}
|
||||||
>
|
>
|
||||||
· {t(failCopyKeys(job, "short"))}{" "}
|
· {t(failCopyKeys(job, "short"))}{" "}
|
||||||
|
|||||||
Reference in New Issue
Block a user