From a5afd603fcdd554344d05cd12764ea10a5faa1e0 Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Sun, 18 Jan 2026 13:43:16 +0200 Subject: [PATCH] appview/pages: improve diff template and show current {inter,}diff round Signed-off-by: Anirudh Oppiliappan --- .../pages/templates/repo/fragments/diff.html | 40 +++++++++++++++++-- appview/pages/templates/repo/pulls/pull.html | 18 ++++----- 2 files changed, 46 insertions(+), 12 deletions(-) diff --git a/appview/pages/templates/repo/fragments/diff.html b/appview/pages/templates/repo/fragments/diff.html index 901c01d0..282b81f0 100644 --- a/appview/pages/templates/repo/fragments/diff.html +++ b/appview/pages/templates/repo/fragments/diff.html @@ -4,7 +4,7 @@ #filesToggle:checked ~ div label[for="filesToggle"] .hide-text { display: inline; } #filesToggle:not(:checked) ~ div label[for="filesToggle"] .hide-text { display: none; } #filesToggle:checked ~ div div#files { width: fit-content; max-width: 15vw; margin-right: 1rem; } - #filesToggle:not(:checked) ~ div div#files { width: 0; display: hidden; margin-right: 0; } + #filesToggle:not(:checked) ~ div div#files { width: 0; display: none; margin-right: 0; } {{ template "diffTopbar" . }} @@ -14,12 +14,16 @@ {{ define "diffTopbar" }} {{ $diff := index . 0 }} {{ $opts := index . 1 }} + {{ $root := "" }} + {{ if gt (len .) 2 }} + {{ $root = index . 2 }} + {{ end }} {{ block "filesCheckbox" $ }} {{ end }} {{ block "subsCheckbox" $ }} {{ end }} -
+
{{ template "filesToggle" . }} @@ -29,6 +33,36 @@ {{ template "repo/fragments/diffStatPill" $stat }} {{ $count }} changed file{{ if ne $count 1 }}s{{ end }} + {{ if $root }} + {{ if $root.IsInterdiff }} + + + {{ else if ne $root.ActiveRound nil }} + +
+ Diff + + #{{ $root.ActiveRound }} + +
+ {{ end }} + {{ end }} +
@@ -137,7 +171,7 @@ {{ end }} {{ define "collapseToggle" }} -
-
+
-

Review Panel

+ border-t md:border-x md:border-t-0 border-gray-200 dark:border-gray-700"> +

Submissions

{{ template "subsPanelSummary" $ }}
@@ -151,7 +151,7 @@ {{ else }} - viewing round + viewing round #{{ $root.ActiveRound }} {{ if ne $root.ActiveRound $latest }} @@ -176,7 +176,7 @@ {{ define "subsToggle" }}