Permalink
Browse files

component: Display Event.Rename.From with a line-through effect.

Apply this change to make the issue rename event easier to read.
  • Loading branch information...
dmitshur committed Dec 29, 2018
1 parent d91d667 commit a359f164dfa502a21cdc4cc3582a5b4221308d2a
Showing with 7 additions and 1 deletion.
  1. +7 −1 component/component.go
@@ -112,7 +112,13 @@ func (e Event) text() []*html.Node {
}
return ns
case issues.Renamed:
return []*html.Node{htmlg.Text("changed the title from "), htmlg.Strong(e.Event.Rename.From), htmlg.Text(" to "), htmlg.Strong(e.Event.Rename.To)}
from := &html.Node{
Type: html.ElementNode, Data: atom.Del.String(),
Attr: []html.Attribute{{Key: atom.Style.String(), Val: "font-weight: bold;"}},
FirstChild: htmlg.Text(e.Event.Rename.From),
}
to := htmlg.Strong(e.Event.Rename.To)
return []*html.Node{htmlg.Text("changed the title "), from, htmlg.Text(" "), to}
case issues.Labeled:
var ns []*html.Node
ns = append(ns, htmlg.Text("added the "))

0 comments on commit a359f16

Please sign in to comment.