feat(FN-2558): lock TaskCard footer metadata to one line

- Prevent TaskCard footer row metadata from wrapping by enforcing nowrap layout
- Make files-changed chip flex safely and truncate long text with ellipsis while preserving icon visibility
- Keep timer chip placement anchored to the right side of the footer metadata row
- Add TaskCard and board-mobile regression tests asserting footer child order and CSS layout guarantees
This commit is contained in:
Fusion
2026-04-25 17:44:04 -07:00
committed by gsxdsm
parent 02e54b290c
commit 9a22ae9be4
3 changed files with 32 additions and 1 deletions

View File

@@ -428,7 +428,7 @@
gap: var(--space-sm);
margin-top: var(--space-sm);
min-width: 0;
flex-wrap: wrap;
flex-wrap: nowrap;
}
.card-session-files {
@@ -442,6 +442,19 @@
font-size: 12px;
cursor: pointer;
min-width: 0;
flex: 1 1 auto;
overflow: hidden;
}
.card-session-files svg {
flex-shrink: 0;
}
.card-session-files span {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.card-session-files:hover {

View File

@@ -534,6 +534,8 @@ describe("TaskCard", () => {
expect(timer).not.toBeNull();
expect(footerRow?.contains(filesChanged)).toBe(true);
expect(footerRow?.contains(timer)).toBe(true);
expect(filesChanged?.nextElementSibling).toBe(timer);
expect(Array.from(footerRow?.children ?? [])).toEqual([filesChanged, timer]);
});
it.each(["triage", "todo", "in-review", "archived"] as const)(
"does not render timer chip for %s cards",

View File

@@ -232,6 +232,22 @@ describe("TaskCard mobile", () => {
}
});
it("keeps TaskCard footer row on one line", () => {
const css = loadAllAppCss();
expectRuleToContain(css, ".card-footer-row", "flex-wrap: nowrap;");
});
it("keeps TaskCard timer chip right-aligned with files metadata", () => {
const css = loadAllAppCss();
expectRuleToContain(css, ".card-time-indicator", "margin-left: auto;");
});
it("truncates TaskCard files-changed text instead of wrapping", () => {
const css = loadAllAppCss();
expectRuleToContain(css, ".card-session-files span", "text-overflow: ellipsis;");
expectRuleToContain(css, ".card-session-files span", "white-space: nowrap;");
});
it("sets .card-edit-btn width and height to 32px in the mobile media block", () => {
const css = loadAllAppCss();
const mobileSection = getMainMobileSection(css);