From 6fdd37625f33d894d21c21c6ee81164450df7fd4 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Wed, 28 Jan 2026 15:17:15 +0000 Subject: [PATCH] appview/pages: add the resizable script to pages that utilize diffs the pulls page includes an additional resizer to mutate the size of the submissions panel. Signed-off-by: oppiliappan --- appview/pages/templates/repo/fragments/diff.html | 21 +++++++++++++++++++-- appview/pages/templates/repo/pulls/pull.html | 27 ++++++++++++++++++++++----- 2 file(s) changed, 41 insertion(s)(+), 7 deletion(s)(-) diff --git a/appview/pages/templates/repo/fragments/diff.html b/appview/pages/templates/repo/fragments/diff.html --- a/appview/pages/templates/repo/fragments/diff.html +++ b/appview/pages/templates/repo/fragments/diff.html @@ -3,12 +3,14 @@ {{ template "diffTopbar" . }} {{ block "diffLayout" . }} {{ end }} + {{ template "fragments/resizable" }} {{ end }} {{ define "diffTopbar" }} @@ -78,6 +80,19 @@ {{ end }} +{{ define "resize-grip" }} + {{ $id := index . 0 }} + {{ $target := index . 1 }} + {{ $direction := index . 2 }} + +{{ end }} + {{ define "diffLayout" }} {{ $diff := index . 0 }} {{ $opts := index . 1 }} @@ -90,8 +105,10 @@ {{ template "repo/fragments/fileTree" $diff.FileTree }} + {{ template "resize-grip" (list "resize-files" "files" "before") }} + -
+
{{ template "diffFiles" (list $diff $opts) }}
diff --git a/appview/pages/templates/repo/pulls/pull.html b/appview/pages/templates/repo/pulls/pull.html --- a/appview/pages/templates/repo/pulls/pull.html +++ b/appview/pages/templates/repo/pulls/pull.html @@ -111,6 +111,19 @@
{{ end }} {{ end }} +{{ define "resize-grip" }} + {{ $id := index . 0 }} + {{ $target := index . 1 }} + {{ $direction := index . 2 }} + +{{ end }} + {{ define "diffLayout" }} {{ $diff := index . 0 }} {{ $opts := index . 1 }} @@ -124,10 +137,14 @@ {{ template "repo/fragments/fileTree" $diff.FileTree }} + {{ template "resize-grip" (list "resize-files" "files" "before") }} + -
+
{{ template "diffFiles" (list $diff $opts) }}
+ + {{ template "resize-grip" (list "resize-subs" "subs" "after") }} {{ template "subsPanel" $ }} @@ -187,7 +204,6 @@ {{ end }} {{ define "subsToggle" }} -- tangled.sh