From 072b029b336a3d12c40060e8472373fded676dc2 Mon Sep 17 00:00:00 2001 From: delvh Date: Mon, 27 May 2024 10:24:34 +0200 Subject: [PATCH] Simplify review UI (#31062) Instead of always displaying all available actions as buttons, merge them into a single dropdown menu, same as GitHub. That decreases visual overload and is more mobile-friendly, while not losing any functionality. ## Screenshots
Before ![grafik](https://github.com/go-gitea/gitea/assets/51889757/b957fab0-4cc7-4cf5-a6c8-33f571be7b19)
After (unexpanded) ![grafik](https://github.com/go-gitea/gitea/assets/51889757/c8fd3428-4092-4295-bd55-c243409ba90d)
After (expanded) ![grafik](https://github.com/go-gitea/gitea/assets/51889757/c0eada91-54be-42ce-9db1-0db56d971438)
--- templates/repo/diff/box.tmpl | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 641de294fd9a9..daacdf4ba0648 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -159,25 +159,30 @@ {{if and $isReviewFile $file.HasChangedSinceLastReview}} {{ctx.Locale.Tr "repo.pulls.has_changed_since_last_review"}} {{end}} - {{if not (or $file.IsIncomplete $file.IsBin $file.IsSubmodule)}} - - - {{end}} - {{if and (not $file.IsSubmodule) (not $.PageIsWiki)}} - {{if $file.IsDeleted}} - {{ctx.Locale.Tr "repo.diff.view_file"}} - {{else}} - {{ctx.Locale.Tr "repo.diff.view_file"}} - {{if and $.Repository.CanEnableEditor $.CanEditFile (not $file.IsLFSFile) (not $file.IsBin)}} - {{ctx.Locale.Tr "repo.editor.edit_this_file"}} - {{end}} - {{end}} - {{end}} {{if $isReviewFile}} {{end}} +