From a4938db059932a7dd9de892f6b366ce004dcb55f Mon Sep 17 00:00:00 2001 From: eti Date: Sat, 19 Sep 2026 03:05:31 +0200 Subject: [PATCH] web/tickets: rescale ticket and issue views Signed-off-by: eti --- .../components/repo/issues/IssueForm.svelte | 27 +++--- .../repo/issues/IssueThreadView.svelte | 8 +- .../lib/components/repo/tickets/Ticket.svelte | 10 +-- .../repo/tickets/TicketCard.stories.svelte | 2 +- .../components/repo/tickets/TicketCard.svelte | 6 +- .../repo/tickets/TicketCardContent.svelte | 6 +- .../components/repo/tickets/TicketForm.svelte | 6 +- .../repo/tickets/TicketInfoBar.svelte | 12 ++- .../components/repo/tickets/TicketList.svelte | 16 +++- .../repo/tickets/TicketSearch.stories.svelte | 4 +- .../repo/tickets/TicketSearch.svelte | 3 +- .../repo/tickets/TicketStatePill.svelte | 6 +- .../repo/tickets/TicketToolbar.svelte | 90 ++++++++++--------- 13 files changed, 103 insertions(+), 93 deletions(-) diff --git a/web/src/lib/components/repo/issues/IssueForm.svelte b/web/src/lib/components/repo/issues/IssueForm.svelte index 5205b62fa..be87165e4 100644 --- a/web/src/lib/components/repo/issues/IssueForm.svelte +++ b/web/src/lib/components/repo/issues/IssueForm.svelte @@ -15,6 +15,7 @@ import AccountSelector from "$lib/components/auth/AccountSelector.svelte"; import Button from "$lib/components/ui/Button.svelte"; import ErrorAlert from "$lib/components/ui/Error.svelte"; + import Field from "$lib/components/ui/Field.svelte"; import Input from "$lib/components/ui/Input.svelte"; import MarkdownEditor from "$lib/components/ui/MarkdownEditor.svelte"; import Spinner from "$lib/components/ui/Spinner.svelte"; @@ -114,17 +115,19 @@ const canSubmit = $derived(title.trim() !== "" && !save.loading); -
-
- - -
- -
- Body + + + + + -
+ -
+
{#if mode === "create"}
- + (mockLabelNames = names)} /> - +
diff --git a/web/src/lib/components/repo/tickets/Ticket.svelte b/web/src/lib/components/repo/tickets/Ticket.svelte index 5d0581158..77646816b 100644 --- a/web/src/lib/components/repo/tickets/Ticket.svelte +++ b/web/src/lib/components/repo/tickets/Ticket.svelte @@ -102,18 +102,18 @@ oncancel={() => (editing = false)} /> {:else} -
-
-
+
+
+

{ticket.title} #{ticket.rkey}

-
+
{#if extraActions} -
+
{@render extraActions()}
{/if} diff --git a/web/src/lib/components/repo/tickets/TicketCard.stories.svelte b/web/src/lib/components/repo/tickets/TicketCard.stories.svelte index 0a241a6f8..6a89f7b7f 100644 --- a/web/src/lib/components/repo/tickets/TicketCard.stories.svelte +++ b/web/src/lib/components/repo/tickets/TicketCard.stories.svelte @@ -40,7 +40,7 @@ - + diff --git a/web/src/lib/components/repo/tickets/TicketCard.svelte b/web/src/lib/components/repo/tickets/TicketCard.svelte index 1c86d42cc..43e9adb3c 100644 --- a/web/src/lib/components/repo/tickets/TicketCard.svelte +++ b/web/src/lib/components/repo/tickets/TicketCard.svelte @@ -8,8 +8,8 @@ repoName: string; ticket: IssueSummary | PullSummary; isPull?: boolean; + rounded?: CardVariants["rounded"]; border?: CardVariants["border"]; - shadow?: CardVariants["shadow"]; background?: CardVariants["background"]; } @@ -18,12 +18,12 @@ repoName, ticket, isPull = false, + rounded = true, border = true, - shadow = false, background = true }: Props = $props(); - + diff --git a/web/src/lib/components/repo/tickets/TicketCardContent.svelte b/web/src/lib/components/repo/tickets/TicketCardContent.svelte index 5eb9a2b0a..f115e66bf 100644 --- a/web/src/lib/components/repo/tickets/TicketCardContent.svelte +++ b/web/src/lib/components/repo/tickets/TicketCardContent.svelte @@ -22,7 +22,7 @@ ); -
+
{ticket.title} #{ticket.rkey} @@ -38,9 +38,9 @@ > {#snippet extraInfo()} - + {formatCount(ticket.commentCount)} {ticket.commentCount === 1 ? "comment" : "comments"} - + {/snippet} diff --git a/web/src/lib/components/repo/tickets/TicketForm.svelte b/web/src/lib/components/repo/tickets/TicketForm.svelte index b9d1a7101..bcdbe700a 100644 --- a/web/src/lib/components/repo/tickets/TicketForm.svelte +++ b/web/src/lib/components/repo/tickets/TicketForm.svelte @@ -49,7 +49,7 @@ const canSubmit = $derived(title.trim() !== "" && !save.loading); - +
{#if targetBranch} -
todo: target branch selector
+
todo: target branch selector
{/if}
@@ -83,7 +83,7 @@ -
+
diff --git a/web/src/lib/components/repo/tickets/TicketInfoBar.svelte b/web/src/lib/components/repo/tickets/TicketInfoBar.svelte index a33b21054..32eab1aed 100644 --- a/web/src/lib/components/repo/tickets/TicketInfoBar.svelte +++ b/web/src/lib/components/repo/tickets/TicketInfoBar.svelte @@ -87,9 +87,7 @@ class="w-auto" > {#snippet trigger({ props })} -
+
- {#if isPull} + {#snippet filters()} + - {/if} + {#if isPull} + + {/if} + + + {/snippet} + + {#snippet trailing()} - - - Closed - - - - - -
+ {/snippet} + {#snippet pendingCount(value: number | Promise)} -- 2.51.2