mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 22:28:05 +01:00 
			
		
		
		
	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  ## After 
This commit is contained in:
		
							parent
							
								
									669bbbaf24
								
							
						
					
					
						commit
						abfdaef5bd
					
				| @ -143,7 +143,7 @@ func RenderLabel(ctx context.Context, label *issues_model.Label) template.HTML { | ||||
| 
 | ||||
| 	if labelScope == "" { | ||||
| 		// Regular label | ||||
| 		s := fmt.Sprintf("<div class='ui label' style='color: %s !important; background-color: %s !important' title='%s'>%s</div>", | ||||
| 		s := fmt.Sprintf("<div class='ui label' style='color: %s !important; background-color: %s !important' data-tooltip-content title='%s'>%s</div>", | ||||
| 			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("<span class='ui label scope-parent' title='%s'>"+ | ||||
| 	s := fmt.Sprintf("<span class='ui label scope-parent' data-tooltip-content title='%s'>"+ | ||||
| 		"<div class='ui label scope-left' style='color: %s !important; background-color: %s !important'>%s</div>"+ | ||||
| 		"<div class='ui label scope-right' style='color: %s !important; background-color: %s !important'>%s</div>"+ | ||||
| 		"</span>", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user