diff options
author | Griffin Smith <grfn@gws.fyi> | 2021-05-23T12·31+0200 |
---|---|---|
committer | grfn <grfn@gws.fyi> | 2021-05-23T14·46+0000 |
commit | 43e3355eae0ed1cef2150e720512fe71993f607d (patch) | |
tree | 9552fedd524f46dd718b7b03a6c925f4759388c8 | |
parent | a7d07e1a8a78ee8e5ecdd7f0f63d0c69e67a3396 (diff) |
fix(panettone): Don't display the full before/after of issue bodies r/2615
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>
-rw-r--r-- | web/panettone/src/panettone.lisp | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/web/panettone/src/panettone.lisp b/web/panettone/src/panettone.lisp index 87b39ad9461d..fc69bc449229 100644 --- a/web/panettone/src/panettone.lisp +++ b/web/panettone/src/panettone.lisp @@ -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))))))) |