From 765aa1479dc5c9cb57850ef7713cf4740971190e Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 12 Jan 2024 10:45:07 +0800 Subject: [PATCH] Show description as tooltip instead of title for labels (#28754) (#28766) Backport #28754 by @delvh Follow GitHubs behavior of showing the label description as a tooltip instead of the browser native title. ## Before ![grafik](https://github.com/go-gitea/gitea/assets/51889757/70448327-467b-4bee-b799-40a442a5ce16) ## After ![grafik](https://github.com/go-gitea/gitea/assets/51889757/abe7d700-148b-4cef-a487-6b0f8f20b212) Co-authored-by: delvh (cherry picked from commit 9f0c709637c30241224784a7c5e0f376c6b958ef) --- modules/templates/util_render.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/templates/util_render.go b/modules/templates/util_render.go index 84c3a1587a..639d58126c 100644 --- a/modules/templates/util_render.go +++ b/modules/templates/util_render.go @@ -143,7 +143,7 @@ func RenderLabel(ctx context.Context, label *issues_model.Label) template.HTML { if labelScope == "" { // Regular label - s := fmt.Sprintf("
%s
", + s := fmt.Sprintf("
%s
", textColor, label.Color, description, RenderEmoji(ctx, label.Name)) return template.HTML(s) } @@ -177,7 +177,7 @@ func RenderLabel(ctx context.Context, label *issues_model.Label) template.HTML { itemColor := "#" + hex.EncodeToString(itemBytes) scopeColor := "#" + hex.EncodeToString(scopeBytes) - s := fmt.Sprintf(""+ + s := fmt.Sprintf(""+ "
%s
"+ "
%s
"+ "
",