diff --git a/desktop/src/components/CobTeaser.svelte b/desktop/src/components/CobTeaser.svelte
new file mode 100644
index 000000000..aacf91052
--- /dev/null
+++ b/desktop/src/components/CobTeaser.svelte
@@ -0,0 +1,113 @@
+
+
+
+
+{#snippet teaser()}
+
+
+
+ {@render icon()}
+
+
+ {@render heading()}
+
+ {@render meta()}
+
+
+
+
+ {#if badges}
+
+ {@render badges()}
+
+ {/if}
+
+{/snippet}
+
+{#if focussed}
+
+ {@render teaser()}
+
+{:else}
+ {@render teaser()}
+{/if}
diff --git a/desktop/src/components/CountBadge.svelte b/desktop/src/components/CountBadge.svelte
new file mode 100644
index 000000000..6fa0080ff
--- /dev/null
+++ b/desktop/src/components/CountBadge.svelte
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+ {count}
+
diff --git a/desktop/src/components/IssueTeaser.svelte b/desktop/src/components/IssueTeaser.svelte
index 9d9e5e42c..2686139d1 100644
--- a/desktop/src/components/IssueTeaser.svelte
+++ b/desktop/src/components/IssueTeaser.svelte
@@ -11,6 +11,8 @@
issueStatusColor,
} from "@app/lib/utils";
+ import CobTeaser from "@app/components/CobTeaser.svelte";
+ import CountBadge from "@app/components/CountBadge.svelte";
import Icon from "@app/components/Icon.svelte";
import Id from "@app/components/Id.svelte";
import InlineTitle from "@app/components/InlineTitle.svelte";
@@ -30,111 +32,39 @@
$props();
-
-
-{#snippet issueSnippet()}
-
- {
- void push({ resource: "repo.issue", rid, issue: issue.id, status });
- }}>
-
-
- {#if issue.state.status === "open"}
-
- {:else}
-
- {/if}
-
-
-
-
-
- opened
-
-
- {formatTimestamp(issue.timestamp)}
-
-
-
-
-
-
- {#each issue.labels as label}
-
- {/each}
-
- {#if issue.commentCount > 0}
-
-
- {issue.commentCount}
-
- {/if}
-
-
-{/snippet}
-
-{#if focussed}
-
- {@render issueSnippet()}
-
-{:else}
- {@render issueSnippet()}
-{/if}
+ {
+ void push({ resource: "repo.issue", rid, issue: issue.id, status });
+ }}>
+ {#snippet icon()}
+ {#if issue.state.status === "open"}
+
+ {:else}
+
+ {/if}
+ {/snippet}
+ {#snippet heading()}
+
+ {/snippet}
+ {#snippet meta()}
+
+ opened
+
+
+ {formatTimestamp(issue.timestamp)}
+
+ {/snippet}
+ {#snippet badges()}
+ {#each issue.labels as label}
+
+ {/each}
+ {#if issue.commentCount > 0}
+
+ {/if}
+ {/snippet}
+
diff --git a/desktop/src/components/PatchTeaser.svelte b/desktop/src/components/PatchTeaser.svelte
index 11afef4fc..b9e7b7422 100644
--- a/desktop/src/components/PatchTeaser.svelte
+++ b/desktop/src/components/PatchTeaser.svelte
@@ -14,6 +14,8 @@
patchStatusColor,
} from "@app/lib/utils";
+ import CobTeaser from "@app/components/CobTeaser.svelte";
+ import CountBadge from "@app/components/CountBadge.svelte";
import DiffStatBadge from "@app/components/DiffStatBadge.svelte";
import Icon from "@app/components/Icon.svelte";
import Id from "@app/components/Id.svelte";
@@ -59,147 +61,67 @@
});
-
-
-{#snippet patchSnippet()}
-
- {
- void push({
- resource: "repo.patch",
- rid,
- patch: patch.id,
- status,
- reviewId: undefined,
- });
- }}>
-
+
{
+ void push({
+ resource: "repo.patch",
+ rid,
+ patch: patch.id,
+ status,
+ reviewId: undefined,
+ });
+ }}>
+ {#snippet icon()}
+
+ {/snippet}
+ {#snippet heading()}
+
+ {/snippet}
+ {#snippet meta()}
+
+ opened
+
+
+ {formatTimestamp(patch.timestamp)}
+
+ {/snippet}
+ {#snippet badges()}
+ {#if hasDraftReview}
-
-
-
-
-
-
- opened
-
-
- {formatTimestamp(patch.timestamp)}
-
-
-
-
-
-
- {#if hasDraftReview}
-
- Review in progress
-
- {/if}
-
- {#await cachedDiffStats(rid, patch.base, patch.head) then stats}
-
- {/await}
-
- {#each patch.labels as label}
-
- {/each}
- {#if patch.commentCount > 0}
-
-
- {patch.commentCount}
-
- {/if}
-
-
-
- {patch.revisionIds.length}
+ style:padding="0.125rem 0.5rem"
+ style:color="var(--color-text-primary)">
+ Review in progress
-
-
-{/snippet}
+ {/if}
-{#if focussed}
-
- {@render patchSnippet()}
-
-{:else}
- {@render patchSnippet()}
-{/if}
+ {#await cachedDiffStats(rid, patch.base, patch.head) then stats}
+
+ {/await}
+
+ {#each patch.labels as label}
+
+ {/each}
+ {#if patch.commentCount > 0}
+
+ {/if}
+
+
+ {/snippet}
+
diff --git a/desktop/src/components/ReleaseTeaser.svelte b/desktop/src/components/ReleaseTeaser.svelte
index 447faa541..f3522c5e7 100644
--- a/desktop/src/components/ReleaseTeaser.svelte
+++ b/desktop/src/components/ReleaseTeaser.svelte
@@ -8,6 +8,8 @@
formatTimestamp,
} from "@app/lib/utils";
+ import CobTeaser from "@app/components/CobTeaser.svelte";
+ import CountBadge from "@app/components/CountBadge.svelte";
import DelegateBadge from "@app/components/DelegateBadge.svelte";
import Icon from "@app/components/Icon.svelte";
import Id from "@app/components/Id.svelte";
@@ -22,30 +24,10 @@
const { delegateIds, release, rid }: Props = $props();
- const title = $derived(release.title || release.tagName || release.id);
+ const releaseTitle = $derived(release.title || release.tagName || release.id);
-
- {
void push({
resource: "repo.release",
@@ -79,36 +47,32 @@
release: release.id,
});
}}>
-
+ {#snippet icon()}
-
-
+ {/snippet}
+ {#snippet heading()}
-
+
{#if release.tagName}
{release.tagName}
{/if}
-
-
- {#if delegateIds.has(release.creator.did)}
-
- {/if}
- created
-
-
- {formatTimestamp(release.createdAt)}
-
-
-
-
-
-
-
- {release.artifacts.length}
-
-
-
+ {/snippet}
+ {#snippet meta()}
+
+ {#if delegateIds.has(release.creator.did)}
+
+ {/if}
+ created
+
+
+ {formatTimestamp(release.createdAt)}
+
+ {/snippet}
+ {#snippet badges()}
+
+ {/snippet}
+
diff --git a/desktop/tests/e2e/repo/issues.spec.ts b/desktop/tests/e2e/repo/issues.spec.ts
index 00ba90c8b..5b74df52c 100644
--- a/desktop/tests/e2e/repo/issues.spec.ts
+++ b/desktop/tests/e2e/repo/issues.spec.ts
@@ -3,6 +3,6 @@ import { cobRid, expect, test } from "@tests/support/fixtures.js";
test("navigate issues listing", async ({ page }) => {
await page.goto(`/repos/${cobRid}/issues?status=all`);
await page.getByRole("link", { name: "Closed" }).click();
- await expect(page.locator(".issue-teaser")).toHaveCount(2);
+ await expect(page.locator(".cob-teaser")).toHaveCount(2);
await expect(page).toHaveURL(`/repos/${cobRid}/issues?status=closed`);
});