From d358672a216188fdea20137e26a2ed42f2b3b9be Mon Sep 17 00:00:00 2001 From: eti Date: Thu, 3 Sep 2026 15:27:42 +0200 Subject: [PATCH] web/tickets: improve ReactionPicker styles and show Ticket action row conditionally Signed-off-by: eti --- .../lib/components/reaction/Reaction.svelte | 38 +++++-------- .../components/reaction/ReactionPicker.svelte | 23 +++----- .../lib/components/repo/tickets/Ticket.svelte | 53 +++++++++++-------- 3 files changed, 50 insertions(+), 64 deletions(-) diff --git a/web/src/lib/components/reaction/Reaction.svelte b/web/src/lib/components/reaction/Reaction.svelte index 567e0ae6b..560c77731 100644 --- a/web/src/lib/components/reaction/Reaction.svelte +++ b/web/src/lib/components/reaction/Reaction.svelte @@ -1,6 +1,7 @@ -{#if ontoggle} - -{:else} - - {reaction.kind} - {formatCount(reaction.count)} - -{/if} + diff --git a/web/src/lib/components/reaction/ReactionPicker.svelte b/web/src/lib/components/reaction/ReactionPicker.svelte index 49d4c866f..c7c873624 100644 --- a/web/src/lib/components/reaction/ReactionPicker.svelte +++ b/web/src/lib/components/reaction/ReactionPicker.svelte @@ -7,6 +7,7 @@ import type { ReactionRecord } from "$lib/api/reaction"; import Button from "$lib/components/ui/Button.svelte"; import { ORDERED_REACTION_KINDS, type ReactionKind } from "$lib/components/reaction/reactions"; + import Dropdown from "../ui/Dropdown.svelte"; interface Props { subjectUri: string; @@ -53,23 +54,11 @@ }; - + + {#snippet trigger()} + + {/snippet} -
{#each ORDERED_REACTION_KINDS as kind (kind)}
-
+
diff --git a/web/src/lib/components/repo/tickets/Ticket.svelte b/web/src/lib/components/repo/tickets/Ticket.svelte index e3ee90aed..036b129ff 100644 --- a/web/src/lib/components/repo/tickets/Ticket.svelte +++ b/web/src/lib/components/repo/tickets/Ticket.svelte @@ -61,6 +61,11 @@ const reporting = createReporting(); const isAuthor = $derived(auth.currentDid === ticket.author.did); const isPull = $derived(ticket.targetBranch !== undefined); + const showActionRow = $derived( + reactions.length > 0 || + (reactionsAlwaysShow && auth.currentUser !== null) || + reporting.canReport(ticket.author.did) + ); let editing = $state(false); @@ -85,7 +90,7 @@ oncancel={() => (editing = false)} /> {:else} -
+

@@ -126,27 +131,33 @@ {extraInfo} />

-
+
-
- - {#if reporting.canReport(ticket.author.did)} - - - - {/if} -
+ {#if showActionRow} +
+ + {#if reporting.canReport(ticket.author.did)} + + + + {/if} +
+ {/if}
-- 2.51.2