A vibe coded tangled fork which supports pijul.
1{{ define "repo/pulls/fragments/pullNewComment" }}
2<div
3 id="pull-comment-card-{{ .RoundNumber }}"
4 class="w-full flex flex-col gap-2">
5 {{ template "user/fragments/picHandleLink" .LoggedInUser.Did }}
6 <form
7 hx-post="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .RoundNumber }}/comment"
8 hx-trigger="submit, keydown[(ctrlKey || metaKey) && key=='Enter'] from:#pull-comment-textarea"
9 hx-swap="none"
10 hx-on::after-request="if(event.detail.successful) this.reset()"
11 hx-disabled-elt="#reply-{{ .RoundNumber }}"
12 class="w-full flex flex-wrap gap-2 group"
13 >
14 <textarea
15 id="pull-comment-textarea"
16 name="body"
17 class="w-full p-2 rounded border"
18 rows=8
19 placeholder="Add to the discussion..."></textarea
20 >
21 {{ template "replyActions" . }}
22 <div id="pull-comment"></div>
23 </form>
24</div>
25{{ end }}
26
27{{ define "replyActions" }}
28 <div class="flex flex-wrap items-stretch justify-end gap-2 text-gray-500 dark:text-gray-400 text-sm w-full">
29 {{ template "cancel" . }}
30 {{ template "reply" . }}
31 </div>
32{{ end }}
33
34{{ define "cancel" }}
35 <button
36 type="button"
37 class="btn text-red-500 dark:text-red-400 flex gap-2 items-center group"
38 hx-get="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .RoundNumber }}/actions"
39 hx-swap="outerHTML"
40 hx-target="#actions-{{.RoundNumber}}"
41 >
42 {{ i "x" "w-4 h-4" }}
43 <span>cancel</span>
44 </button>
45{{ end }}
46
47{{ define "reply" }}
48 <button
49 type="submit"
50 id="reply-{{ .RoundNumber }}"
51 class="btn-create flex items-center gap-2">
52 {{ i "reply" "w-4 h-4 inline group-[.htmx-request]:hidden" }}
53 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }}
54 reply
55 </button>
56{{ end }}
57