···
<span class="select-none before:content-['\00B7']"></span>
<time>{{ .Pull.Created | timeFmt }}</time>
<span class="select-none before:content-['\00B7']"></span>
45
-
<time>targeting branch {{ .Pull.TargetBranch }}</time>
45
+
<span>targeting branch
46
+
<span class="text-xs rounded bg-gray-100 text-black font-mono px-2 mx-1/2 inline-flex items-center">
47
+
{{ .Pull.TargetBranch }}
···
59
-
<section id="submissions">
60
-
{{ block "submissions" . }} {{ end }}
63
+
<section id="submissions" class="mt-4">
64
+
<div class="flex flex-col gap-4">
65
+
{{ block "submissions" . }} {{ end }}
{{ $isPullAuthor := and .LoggedInUser (eq .LoggedInUser.Did .Pull.OwnerDid) }}
···
{{ $lastIdx := sub (len .Pull.Submissions) 1 }}
{{ range $idx, $item := .Pull.Submissions }}
116
+
{{ $oneIndexedRound := add .RoundNumber 1 }}
<details {{ if eq $idx $lastIdx }}open{{ end }}>
111
-
<summary>round #{{ .RoundNumber }}, {{ .Created | timeFmt }}, received {{ len .Comments }} comments</summary>
113
-
<h2>patch submitted by {{index $.DidHandleMap $.Pull.OwnerDid}}</h2>
114
-
<pre><code>{{- .Patch -}}</code></pre>
118
+
<summary id="round-#{{ $oneIndexedRound }}" class="list-none cursor-pointer text-sm">
119
+
<div class="flex gap-2 items-center">
120
+
<div class="rounded bg-white drop-shadow-sm p-3">
121
+
#{{ $oneIndexedRound }}
123
+
<div class="rounded drop-shadow-sm bg-white p-3 text-gray-500">
125
+
{{ $owner := index $.DidHandleMap $.Pull.OwnerDid }}
126
+
submitted by <a href="/{{ $owner }}">{{ $owner }}</a>
127
+
<span class="before:content-['·']"></span>
128
+
<a href="/{{ $.RepoInfo.FullName }}/pulls/{{ $.Pull.PullId }}/patch">view patch</a>
129
+
<span class="select-none before:content-['\00B7']"></span>
130
+
<time>{{ .Created | timeFmt }}</time>
131
+
<span class="select-none before:content-['·']"></span>
133
+
{{ if eq (len .Comments) 1 }}
136
+
{{ len .Comments }} comment{{$s}}
141
+
<div class="pl-12 flex flex-col gap-2 mt-2 relative">
142
+
<!--div class="bg-white rounded drop-shadow-sm p-4">
143
+
<pre class="overflow-auto"><code>{{- .Patch -}}</code></pre>
117
-
<div id="comment-{{.ID}}">
118
-
{{ index $.DidHandleMap .OwnerDid }} commented {{ .Created | timeFmt }}: {{ .Body }}
147
+
<div id="comment-{{.ID}}" class="bg-white rounded drop-shadow-sm py-2 px-4 relative w-fit">
148
+
<div class="absolute left-8 -top-2 w-px h-2 bg-gray-300"></div>
149
+
<div class="text-sm text-gray-500">
150
+
{{ $owner := index $.DidHandleMap .OwnerDid }}
151
+
<a href="/{{$owner}}">{{$owner}}</a>
152
+
<span class="before:content-['·']"></span>
153
+
<time>{{ .Created | timeFmt }}</time>
155
+
<div class="prose">
{{ block "newComment" (list $ .ID) }} {{ end }}
···
135
-
hx-post="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/comment"
174
+
<div class="bg-white rounded drop-shadow-sm py-2 px-4 relative w-full md:w-96">
175
+
<div class="absolute left-8 -top-2 w-px h-2 bg-gray-300"></div>
176
+
<div class="text-sm text-gray-500">
177
+
{{ index .DidHandleMap .LoggedInUser.Did }}
180
+
hx-post="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/comment"
<input type="hidden" name="submissionId" value="{{ $submissionId }}">
141
-
class="w-full p-2 rounded border border-gray-200"
142
-
placeholder="Add to the discussion..."
144
-
<button type="submit" class="btn mt-2">comment</button>
185
+
class="w-full border-0 h-8 focus:outline-none focus:ring-0 px-0 py-1"
186
+
placeholder="Add to the discussion..." /></textarea>
187
+
<div class="flex justify-end">
188
+
<button type="submit" class="btn text-sm mt-2">comment</button>
<div id="pull-comment"></div>
148
-
<div class="bg-white rounded drop-shadow-sm px-6 py-4 mt-8">
149
-
<a href="/login" class="underline">login</a> to join the discussion
193
+
<div class="bg-white rounded drop-shadow-sm px-6 py-4 mt-8">
194
+
<a href="/login" class="underline">login</a> to join the discussion
···
pull request can be merged safely.
234
-
<div class="mt-4 flex items-center gap-2">
280
+
<div class="flex items-center gap-2">
237
-
class="btn flex items-center gap-2"
283
+
class="btn mt-4 flex items-center gap-2"
hx-post="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/merge"
{{ if or .Pull.State.IsClosed .MergeCheck.IsConflicted }}