From abfdaef5bd5b0430ccebc71f51d6504fecf127ac Mon Sep 17 00:00:00 2001 From: delvh Date: Thu, 11 Jan 2024 17:21:52 +0100 Subject: [PATCH] Show description as tooltip instead of title for labels (#28754) 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) --- 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 8621a371bd..2f6132c6f3 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
"+ "
",