From 303832e9ab8954961eb0d0b5f891cfd8c4a4ab3c Mon Sep 17 00:00:00 2001 From: Akshay Date: Tue, 6 May 2025 15:19:56 +0100 Subject: [PATCH] appview: pulls: unify styles for fork-based pulls the pull-source information chip displayed `fork branch` but the two bits of information were styled differently. this patch unifies the styles, moves both bits of info into the same pill, styles them identically, and uses a `:` to separate them `fork:branch`. --- .../repo/pulls/fragments/pullHeader.html | 20 ++++++++--------- appview/pages/templates/repo/pulls/pulls.html | 22 +++++++++---------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/appview/pages/templates/repo/pulls/fragments/pullHeader.html b/appview/pages/templates/repo/pulls/fragments/pullHeader.html index 49a2498..3b9dbe9 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullHeader.html +++ b/appview/pages/templates/repo/pulls/fragments/pullHeader.html @@ -42,19 +42,17 @@ {{ if not .Pull.IsPatchBased }} - from - {{ if .Pull.IsForkBased }} - {{ if .Pull.PullSource.Repo }} - {{ $owner }}/{{ .Pull.PullSource.Repo.Name }} - {{ else }} - [deleted fork] - {{ end }} - {{ end }} - + from - {{ .Pull.PullSource.Branch }} + {{ if .Pull.IsForkBased }} + {{ if .Pull.PullSource.Repo }} + {{ $owner }}/{{ .Pull.PullSource.Repo.Name }}: + {{- else -}} + [deleted fork] + {{- end -}} + {{- end -}} + {{- .Pull.PullSource.Branch -}} - {{ end }} diff --git a/appview/pages/templates/repo/pulls/pulls.html b/appview/pages/templates/repo/pulls/pulls.html index fea5f6e..6db62e1 100644 --- a/appview/pages/templates/repo/pulls/pulls.html +++ b/appview/pages/templates/repo/pulls/pulls.html @@ -79,18 +79,16 @@ {{ if not .IsPatchBased }} - from - {{ if .IsForkBased }} - {{ if .PullSource.Repo }} - {{ $owner }}/{{ .PullSource.Repo.Name }} - {{ else }} - [deleted fork] - {{ end }} - {{ end }} - - - {{ .PullSource.Branch }} - + from + + {{ if .IsForkBased }} + {{ if .PullSource.Repo }} + {{ $owner }}/{{ .PullSource.Repo.Name }}: + {{- else -}} + [deleted fork] + {{- end -}} + {{- end -}} + {{- .PullSource.Branch -}} {{ end }} -- 2.54.0