From cf76a5763e994fd2017a6a73269b29dd23d1cee0 Mon Sep 17 00:00:00 2001
From: Lewis
Date: Thu, 23 Apr 2026 13:10:37 +0300
Subject: [PATCH] appview/pages: rework label panel and new-pull shell for
compose
Lewis: May this revision serve well!
---
.../repo/fragments/compareAllowPull.html | 2 +-
.../pages/templates/repo/fragments/diff.html | 11 +-
.../templates/repo/fragments/diffOpts.html | 47 ++++--
.../repo/fragments/editLabelPanel.html | 148 +++++++++++------
.../templates/repo/fragments/fileTree.html | 34 ++--
.../fragments/labelSectionHeaderText.html | 2 +-
appview/pages/templates/repo/pulls/new.html | 153 +-----------------
7 files changed, 164 insertions(+), 233 deletions(-)
diff --git a/appview/pages/templates/repo/fragments/compareAllowPull.html b/appview/pages/templates/repo/fragments/compareAllowPull.html
index 870a3a9e..9cdf9374 100644
--- a/appview/pages/templates/repo/fragments/compareAllowPull.html
+++ b/appview/pages/templates/repo/fragments/compareAllowPull.html
@@ -9,7 +9,7 @@
discussed.
- {{ $newPullUrl := printf "/%s/pulls/new?strategy=branch&targetBranch=%s&sourceBranch=%s" .RepoInfo.FullName .Base .Head }}
+ {{ $newPullUrl := printf "/%s/pulls/new?source=branch&sourceBranch=%s&targetBranch=%s" .RepoInfo.FullName (urlquery .Head) (urlquery .Base) }}
diff --git a/appview/pages/templates/repo/fragments/diff.html b/appview/pages/templates/repo/fragments/diff.html
index ecc77798..95f56b15 100644
--- a/appview/pages/templates/repo/fragments/diff.html
+++ b/appview/pages/templates/repo/fragments/diff.html
@@ -101,10 +101,11 @@
{{ define "diffLayout" }}
{{ $diff := index . 0 }}
{{ $opts := index . 1 }}
+ {{ $padBottom := gt (len .) 2 }}
-
+
{{ template "repo/fragments/fileTree" $diff.FileTree }}
@@ -113,7 +114,7 @@
{{ template "resize-grip" (list "resize-files" "files" "before") }}
-
+
{{ template "diffFiles" (list $diff $opts) }}
@@ -142,6 +143,8 @@
{{ $idx := index . 0 }}
{{ $file := index . 1 }}
{{ $isSplit := index . 2 }}
+ {{ $collapsed := false }}
+ {{ if gt (len .) 3 }}{{ $collapsed = index . 3 }}{{ end }}
{{ $isGenerated := false }}
{{ $isDeleted := false }}
{{ with $file }}
@@ -152,7 +155,7 @@
{{ else if $n.Old }}
{{ $isGenerated = isGenerated $n.Old }}
{{ end }}
-
+