From 9146cf13f606c30a476e272b20c20b10ee8ba08e Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Mon, 27 Jul 2026 12:45:05 +0100 Subject: [PATCH] wip: repo issues slop Signed-off-by: oppiliappan --- .../components/repo/issues/IssueCard.svelte | 45 +++++++++++++ .../components/repo/issues/IssueList.svelte | 23 +++++++ .../repo/issues/IssueStatePill.svelte | 38 +++++++++++ .../repo/issues/IssueToolbar.svelte | 65 +++++++++++++++++++ web/src/lib/components/repo/types.ts | 10 +++ .../[handle]/[repo]/issues/+page.svelte | 20 ++++++ .../routes/[handle]/[repo]/issues/+page.ts | 18 +++++ 7 files changed, 219 insertions(+) create mode 100644 web/src/lib/components/repo/issues/IssueCard.svelte create mode 100644 web/src/lib/components/repo/issues/IssueList.svelte create mode 100644 web/src/lib/components/repo/issues/IssueStatePill.svelte create mode 100644 web/src/lib/components/repo/issues/IssueToolbar.svelte create mode 100644 web/src/routes/[handle]/[repo]/issues/+page.svelte create mode 100644 web/src/routes/[handle]/[repo]/issues/+page.ts diff --git a/web/src/lib/components/repo/issues/IssueCard.svelte b/web/src/lib/components/repo/issues/IssueCard.svelte new file mode 100644 index 00000000..494c6371 --- /dev/null +++ b/web/src/lib/components/repo/issues/IssueCard.svelte @@ -0,0 +1,45 @@ + + + diff --git a/web/src/lib/components/repo/issues/IssueList.svelte b/web/src/lib/components/repo/issues/IssueList.svelte new file mode 100644 index 00000000..9e2132ac --- /dev/null +++ b/web/src/lib/components/repo/issues/IssueList.svelte @@ -0,0 +1,23 @@ + + +{#if issues.length === 0} + +{:else} +
+ {#each issues as issue (issue.id)} + + {/each} +
+{/if} diff --git a/web/src/lib/components/repo/issues/IssueStatePill.svelte b/web/src/lib/components/repo/issues/IssueStatePill.svelte new file mode 100644 index 00000000..88071b42 --- /dev/null +++ b/web/src/lib/components/repo/issues/IssueStatePill.svelte @@ -0,0 +1,38 @@ + + + + + + diff --git a/web/src/lib/components/repo/issues/IssueToolbar.svelte b/web/src/lib/components/repo/issues/IssueToolbar.svelte new file mode 100644 index 00000000..dfbf11c4 --- /dev/null +++ b/web/src/lib/components/repo/issues/IssueToolbar.svelte @@ -0,0 +1,65 @@ + + +
+
+ +
+
+
+ + + + + + + + + +
diff --git a/web/src/lib/components/repo/types.ts b/web/src/lib/components/repo/types.ts index 142dc2eb..54494677 100644 --- a/web/src/lib/components/repo/types.ts +++ b/web/src/lib/components/repo/types.ts @@ -38,3 +38,13 @@ export interface LanguageSlice { percentage: number; share: number; } + +export interface IssueSummary { + id: number; + title: string; + state: "open" | "closed"; + authorHandle: string; + authorDid: string; + createdAt: string; + commentCount: number; +} diff --git a/web/src/routes/[handle]/[repo]/issues/+page.svelte b/web/src/routes/[handle]/[repo]/issues/+page.svelte new file mode 100644 index 00000000..4c80616e --- /dev/null +++ b/web/src/routes/[handle]/[repo]/issues/+page.svelte @@ -0,0 +1,20 @@ + + +
+ +
+ +
+ +
diff --git a/web/src/routes/[handle]/[repo]/issues/+page.ts b/web/src/routes/[handle]/[repo]/issues/+page.ts new file mode 100644 index 00000000..c5ae7b27 --- /dev/null +++ b/web/src/routes/[handle]/[repo]/issues/+page.ts @@ -0,0 +1,18 @@ +import type { IssueSummary } from "$lib/components/repo/types"; +import type { PageLoad } from "./$types"; + +export const load: PageLoad = async (event) => { + const parent = await event.parent(); + const state = event.url.searchParams.get("state") === "closed" ? "closed" : "open"; + + // TODO: fetch via sh.tangled.repo.listIssues and resolve author handles + const issues: IssueSummary[] = []; + const closedCount = 0; + + return { + state: state as "open" | "closed", + issues, + openCount: parent.counts.issues, + closedCount + }; +}; -- 2.51.2