From 0e66b0105e69f93dfc67bd2e8de23f6d08b69fdb Mon Sep 17 00:00:00 2001 From: iamyaash Date: Thu, 19 Jun 2025 22:33:05 +0530 Subject: [PATCH] fixes: removed tooltip, renamed css selector for new ui and fixed the repo commit page's commit count - annoying tooltip in mobile view - renamed copy_hash to copy and updated the functioning $commitLink - renamed commit-ui-redesign to commit-timeline in web_src/css/repo.css - added condition to show total commit count in repective pages; 2 rows of commit count was displayed instead of 1, so I added an if condition to fix the issue --- templates/repo/commits_table.tmpl | 45 +++++++++++++------------- templates/repo/pulls/commits_list.tmpl | 9 ++---- web_src/css/repo.css | 16 ++++----- 3 files changed, 34 insertions(+), 36 deletions(-) diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index aa833a4a8f..64079ab787 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -1,27 +1,28 @@ -

-
- {{if or .PageIsCommits (gt .CommitCount 0)}} - {{ctx.Locale.TrN .CommitCount "repo.n_commit_one" "repo.n_commit_few" (ctx.Locale.PrettyNumber .CommitCount)}} - {{else if .IsNothingToCompare}} - {{ctx.Locale.Tr "repo.commits.nothing_to_compare"}} - {{else}} - {{ctx.Locale.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}} - {{end}} -
- {{if .IsDiffCompare}} -

-{{if .PageIsCommits}} +{{else if .PageIsCommits}}

{{if or .PageIsCommits (gt .CommitCount 0)}} diff --git a/templates/repo/pulls/commits_list.tmpl b/templates/repo/pulls/commits_list.tmpl index bcbd7daa63..38b4ac99a3 100644 --- a/templates/repo/pulls/commits_list.tmpl +++ b/templates/repo/pulls/commits_list.tmpl @@ -15,7 +15,7 @@
{{end}} -
+
{{$userName := .Author.Name}} @@ -32,7 +32,7 @@
- {{$commitLink:= printf "%s/pulls/%d/commits/%s" $commitRepoLink (PathEscape .ID.String)}} + {{$commitLink := (printf "%s/pulls/%d/commits/%s" $commitRepoLink $.Issue.Index (PathEscape .ID.String))}}
{{RenderCommitMessageLinkSubject $.Context .Message $commitLink ($.Repository.ComposeMetas ctx)}} {{if IsMultilineCommitMessage .Message}} @@ -73,14 +73,11 @@
-