fix(panettone): Don't display the full before/after of issue bodies
Issue bodies tend to be very long, so displaying the full diff whenever the issue is updated takes up a lot of visual room and is very hard to read. Specifically for this field, this changes the display to only show "updated the body of this issue", hiding the previous and new values. At some point in the future, I'd love to have some CSS fun with active anchor links to have an "expanded" view that *does* display the previous and new value, but for now this should be fine - the data isn't gone, after all! Fixes: b/111 Change-Id: I0188540188729142e0b9205ff5cc9ea576c4edb6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3142 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
parent
a7d07e1a8a
commit
43e3355eae
1 changed files with 18 additions and 15 deletions
|
@ -324,21 +324,24 @@
|
|||
:class "event"
|
||||
:id fragment
|
||||
(who:esc (displayname-if-known user))
|
||||
(if (string= (field event) "STATUS")
|
||||
(who:htm
|
||||
(who:esc
|
||||
(switch ((new-value event) :test #'string=)
|
||||
("OPEN" " reopened ")
|
||||
("CLOSED" " closed ")))
|
||||
" this issue ")
|
||||
(who:htm
|
||||
" changed the "
|
||||
(who:esc (string-downcase (field event)))
|
||||
" of this issue from \""
|
||||
(who:esc (previous-value event))
|
||||
"\" to \""
|
||||
(who:esc (new-value event))
|
||||
"\""))
|
||||
(switch ((field event) :test #'string=)
|
||||
("STATUS"
|
||||
(who:htm
|
||||
(who:esc
|
||||
(switch ((new-value event) :test #'string=)
|
||||
("OPEN" " reopened ")
|
||||
("CLOSED" " closed ")))
|
||||
" this issue "))
|
||||
("BODY" (who:htm " updated the body of this issue"))
|
||||
(t
|
||||
(who:htm
|
||||
" changed the "
|
||||
(who:esc (string-downcase (field event)))
|
||||
" of this issue from \""
|
||||
(who:esc (previous-value event))
|
||||
"\" to \""
|
||||
(who:esc (new-value event))
|
||||
"\"")))
|
||||
" at "
|
||||
(who:esc (format-dottime (created-at event)))))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue