A vibe coded tangled fork which supports pijul.
1{{ define "repo/pulls/fragments/pullNewComment" }}
2 <div
3 id="pull-comment-card-{{ .RoundNumber }}"
4 class="bg-white dark:bg-gray-800 rounded drop-shadow-sm p-4 relative w-full flex flex-col gap-2">
5 <div class="text-sm text-gray-500 dark:text-gray-400">
6 {{ didOrHandle .LoggedInUser.Did .LoggedInUser.Handle }}
7 </div>
8 <form
9 hx-post="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .RoundNumber }}/comment"
10 hx-indicator="#create-comment-spinner"
11 hx-swap="none"
12 class="w-full flex flex-wrap gap-2">
13 <textarea
14 name="body"
15 class="w-full p-2 rounded border border-gray-200"
16 placeholder="Add to the discussion..."></textarea>
17 <button type="submit" class="btn flex items-center gap-2">
18 {{ i "message-square" "w-4 h-4" }}
19 <span>comment</span>
20 <span id="create-comment-spinner" class="group">
21 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }}
22 </span>
23 </button>
24 <button
25 type="button"
26 class="btn flex items-center gap-2 group"
27 hx-get="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .RoundNumber }}/actions"
28 hx-swap="outerHTML"
29 hx-target="#pull-comment-card-{{ .RoundNumber }}">
30 {{ i "x" "w-4 h-4" }}
31 <span>cancel</span>
32 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }}
33 </button>
34 <div id="pull-comment"></div>
35 </form>
36 </div>
37{{ end }}