1{{ define "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-swap="none"
11 class="w-full flex flex-wrap gap-2">
12 <textarea
13 name="body"
14 class="w-full p-2 rounded border border-gray-200"
15 placeholder="Add to the discussion..."></textarea>
16 <button type="submit" class="btn flex items-center gap-2">
17 {{ i "message-square" "w-4 h-4" }} comment
18 </button>
19 <button
20 type="button"
21 class="btn flex items-center gap-2"
22 hx-get="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .RoundNumber }}/actions"
23 hx-swap="outerHTML"
24 hx-target="#pull-comment-card-{{ .RoundNumber }}">
25 {{ i "x" "w-4 h-4" }}
26 <span>cancel</span>
27 </button>
28 <div id="pull-comment"></div>
29 </form>
30</div>
31{{ end }}
32