mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-11 05:11:49 +01:00
Fix sub-issue progress summary styling
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
60abbd1bc4
commit
7f2f0bc64b
4 files changed
+8
-6
No files matched your search
@@ -567,13 +567,14 @@ describe("IssuesList", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("hides the sub-issue progress summary unless it is enabled and populated", async () => {
|
||||
it("hides the sub-issue progress summary unless it is enabled with multiple sub-issues", async () => {
|
||||
const { root } = renderWithQueryClient(
|
||||
<IssuesList
|
||||
issues={[createIssue()]}
|
||||
agents={[]}
|
||||
projects={[]}
|
||||
viewStateKey="paperclip:test-issues"
|
||||
showProgressSummary
|
||||
onUpdateIssue={() => undefined}
|
||||
/>,
|
||||
container,
|
||||
|
||||
@@ -390,7 +390,7 @@ function SubIssueProgressSummaryStrip({
|
||||
.filter((entry) => entry.count > 0);
|
||||
|
||||
return (
|
||||
<div className="rounded-md border border-border bg-muted/20 p-3">
|
||||
<div className="border border-border bg-background p-3">
|
||||
<div className="flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between">
|
||||
<div className="min-w-0 flex-1 space-y-2">
|
||||
<div className="flex flex-wrap items-center gap-x-4 gap-y-1 text-sm">
|
||||
@@ -424,7 +424,7 @@ function SubIssueProgressSummaryStrip({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="min-w-0 rounded-md border border-border bg-background px-3 py-2 text-sm lg:w-72">
|
||||
<div className="min-w-0 border border-border bg-background px-3 py-2 text-sm lg:w-72">
|
||||
{target && targetIssue ? (
|
||||
<>
|
||||
<div className="text-xs font-medium text-muted-foreground">
|
||||
|
||||
@@ -39,8 +39,9 @@ describe("shouldRenderRichSubIssuesSection", () => {
|
||||
});
|
||||
|
||||
describe("shouldRenderSubIssueProgressSummary", () => {
|
||||
it("requires both the opt-in flag and child issues", () => {
|
||||
expect(shouldRenderSubIssueProgressSummary(true, 1)).toBe(true);
|
||||
it("requires both the opt-in flag and multiple child issues", () => {
|
||||
expect(shouldRenderSubIssueProgressSummary(true, 2)).toBe(true);
|
||||
expect(shouldRenderSubIssueProgressSummary(true, 1)).toBe(false);
|
||||
expect(shouldRenderSubIssueProgressSummary(false, 1)).toBe(false);
|
||||
expect(shouldRenderSubIssueProgressSummary(true, 0)).toBe(false);
|
||||
});
|
||||
|
||||
@@ -22,7 +22,7 @@ export function shouldRenderRichSubIssuesSection(childIssuesLoading: boolean, ch
|
||||
}
|
||||
|
||||
export function shouldRenderSubIssueProgressSummary(enabled: boolean | undefined, childIssueCount: number): boolean {
|
||||
return enabled === true && childIssueCount > 0;
|
||||
return enabled === true && childIssueCount > 1;
|
||||
}
|
||||
|
||||
export function buildSubIssueProgressSummary(issues: Issue[]): SubIssueProgressSummary {
|
||||
|
||||
Reference in new issue
Block a user