Something went wrong. Try again.
Monorepo for Tangled forked from tangled.org/core
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364<script module lang="ts"> import { defineMeta } from "@storybook/addon-svelte-csf"; import { sampleMarkup, sampleThreads } from "#fixtures/comments.ts"; import IssueThreadView, { type IssueData } from "#lib/components/repo/issues/IssueThreadView.svelte"; import type { RepoInfo } from "#lib/components/repo/types.ts"; import type { CanonicalResourceUri, Did } from "@atcute/lexicons/syntax";
const ISSUE_URI: CanonicalResourceUri = "at://did:plc:author/org.tangled.track.ticket/3issue"; const ISSUE_AUTHOR: Did = "did:plc:author";
const issue: IssueData = { uri: ISSUE_URI, cid: "bafyissue", rkey: "3issue", title: "Generate loading geometry from the real issue thread", body: "The skeleton should preserve the issue header, metadata, body, comments, and panel chrome.", bodyHtml: "<p>The skeleton should preserve the issue header, metadata, body, comments, and panel chrome.</p>", state: "open", authorDid: ISSUE_AUTHOR, authorHandle: "bob.tngl.sh", createdAt: "2026-08-19T12:00:00Z", reactions: [] }; const repo: RepoInfo = { uri: "at://did:plc:repo/sh.tangled.repo.repo/3repo", rkey: "3repo", name: "tangled", ownerDid: "did:plc:owner", ownerHandle: "bob", repoDid: "did:plc:repo", knot: "knot1.tangled.sh", git: { defaultBranch: "main", isEmpty: false } }; const flaggedIssue: IssueData = { ...issue, moderation: { level: "warn", target: ISSUE_URI } }; const hiddenAuthorIssue: IssueData = { ...issue, moderation: { level: "hide", target: ISSUE_AUTHOR } }; const { Story } = defineMeta({ title: "Repo/Issues/IssueThreadView" });</script>
<Story name="Skeleton fixture" asChild parameters={{ auth: true, notifications: true }}> <IssueThreadView {issue} comments={sampleThreads} markup={sampleMarkup} {repo} /></Story>
<Story name="Flagged issue" asChild parameters={{ auth: true, notifications: true }}> <IssueThreadView issue={flaggedIssue} comments={sampleThreads} markup={sampleMarkup} {repo} /></Story>
<Story name="Hidden author" asChild parameters={{ auth: true, notifications: true }}> <IssueThreadView issue={hiddenAuthorIssue} comments={sampleThreads} markup={sampleMarkup} {repo} /></Story>