fix(FN-4287): group GitHub provenance markers in task footer
- Keep adjacent GitHub provenance markers grouped at the right edge of the TaskCard footer - Add a CSS rule that prevents later provenance chips from reapplying auto left margin - Expand TaskCard regression coverage for imported issues with GitHub tracking links Fusion-Task-Id: FN-4287
This commit is contained in:
@@ -641,6 +641,10 @@
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.card-source-provenance + .card-source-provenance {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.card-source-provenance .provider-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -1252,10 +1252,39 @@ describe("TaskCard", () => {
|
||||
expect(chipStyle.whiteSpace).toBe("nowrap");
|
||||
});
|
||||
|
||||
it("keeps GitHub provenance indicators grouped on the right edge", () => {
|
||||
const css = loadAllAppCssBaseOnly();
|
||||
it("FN-4287: keeps GitHub provenance indicators grouped on the right edge", () => {
|
||||
const { container } = render(
|
||||
<TaskCard
|
||||
task={makeTask({
|
||||
column: "todo",
|
||||
sourceType: "github_import",
|
||||
sourceMetadata: { issueUrl: "https://github.com/owner/repo/issues/42" },
|
||||
githubTracking: {
|
||||
issue: {
|
||||
owner: "other",
|
||||
repo: "tracking",
|
||||
number: 99,
|
||||
url: "https://github.com/other/tracking/issues/99",
|
||||
createdAt: "2026-05-12T00:00:00.000Z",
|
||||
},
|
||||
},
|
||||
})}
|
||||
onOpenDetail={noop}
|
||||
addToast={noop}
|
||||
/>,
|
||||
);
|
||||
|
||||
const footerRow = container.querySelector(".card-footer-row");
|
||||
const footerProvenance = container.querySelectorAll(".card-footer-row .card-source-provenance");
|
||||
const trackingLink = container.querySelector(".card-github-tracking-link");
|
||||
|
||||
expect(footerRow).not.toBeNull();
|
||||
expect(footerProvenance).toHaveLength(1);
|
||||
expect(trackingLink).not.toBeNull();
|
||||
|
||||
const css = loadAllAppCssBaseOnly();
|
||||
expect(css).toMatch(/\.card-footer-row\s*>\s*\.card-source-provenance:first-of-type\s*\{[^}]*margin-left:\s*auto;[^}]*\}/);
|
||||
expect(css).toMatch(/\.card-source-provenance\s*\+\s*\.card-source-provenance\s*\{[^}]*margin-left:\s*0;[^}]*\}/);
|
||||
const provenanceRule = css.match(/\.card-source-provenance\s*\{[^}]*\}/)?.[0] ?? "";
|
||||
expect(provenanceRule).not.toMatch(/margin-left\s*:\s*auto/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user