From 1331c00f0fd56f21c80cbabcbf37666d246e2323 Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Thu, 23 Oct 2025 17:08:10 +0000 Subject: [PATCH] appview/pages: remove unneccessary wrapper div this unecessary div causes an error where the div is duplicated when multiple htmx requests are made. the diff might tell a lot, but all I'm doing here is just merging `div.relative` and `div#actions-%d` with some indent changes. also, I removed the `w-fit` style to give pull comments full width like issue comments have. Signed-off-by: Seongmin Lee --- appview/pages/templates/repo/pulls/fragments/pullActions.html | 166 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------ 1 file(s) changed, 82 insertion(s)(+), 84 deletion(s)(-) diff --git a/appview/pages/templates/repo/pulls/fragments/pullActions.html b/appview/pages/templates/repo/pulls/fragments/pullActions.html --- a/appview/pages/templates/repo/pulls/fragments/pullActions.html +++ b/appview/pages/templates/repo/pulls/fragments/pullActions.html @@ -22,95 +22,93 @@ {{ $isLastRound := eq $roundNumber $lastIdx }} {{ $isSameRepoBranch := .Pull.IsBranchBased }} {{ $isUpToDate := .ResubmitCheck.No }} -
-
- - {{ if .BranchDeleteStatus }} - - {{ end }} - {{ if and $isPushAllowed $isOpen $isLastRound }} - {{ $disabled := "" }} - {{ if $isConflicted }} - {{ $disabled = "disabled" }} +
+ + {{ if .BranchDeleteStatus }} + + {{ end }} + {{ if and $isPushAllowed $isOpen $isLastRound }} + {{ $disabled := "" }} + {{ if $isConflicted }} + {{ $disabled = "disabled" }} + {{ end }} + + {{ end }} + + {{ if and $isPullAuthor $isOpen $isLastRound }} + {{ $disabled := "" }} + {{ if $isUpToDate }} + {{ $disabled = "disabled" }} + {{ end }} + - {{ end }} - {{ if and $isPullAuthor $isOpen $isLastRound }} - {{ $disabled := "" }} - {{ if $isUpToDate }} - {{ $disabled = "disabled" }} + hx-disabled-elt="#resubmitBtn" + class="btn p-2 flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed group" {{ $disabled }} + + {{ if $disabled }} + title="Update this branch to resubmit this pull request" + {{ else }} + title="Resubmit this pull request" {{ end }} - + {{ end }} - hx-disabled-elt="#resubmitBtn" - class="btn p-2 flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed group" {{ $disabled }} + {{ if and (or $isPullAuthor $isPushAllowed) $isOpen $isLastRound }} + + {{ end }} - {{ if $disabled }} - title="Update this branch to resubmit this pull request" - {{ else }} - title="Resubmit this pull request" - {{ end }} - > - {{ i "rotate-ccw" "w-4 h-4" }} - resubmit - {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} - - {{ end }} - - {{ if and (or $isPullAuthor $isPushAllowed) $isOpen $isLastRound }} - - {{ end }} - - {{ if and (or $isPullAuthor $isPushAllowed) $isClosed $isLastRound }} - - {{ end }} -
+ {{ if and (or $isPullAuthor $isPushAllowed) $isClosed $isLastRound }} + + {{ end }}
{{ end }} -- tangled.sh