fix(web/panettone): Dont double up on borders

Don't render the <ol class="issue-history"> when we have nothing to put
in it, which is the case when there's no issue history and the user is
not logged in. This avoids an awkward-looking double bottom border on
issues with no comments for unauthenticated users.

Change-Id: I1c6aac40e4ba93e9428a0da589c67582b1589c17
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5445
Autosubmit: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
Griffin Smith 2022-04-14 10:12:26 -04:00 committed by grfn
parent 3c294fbabd
commit 47d075924e

View file

@ -391,13 +391,14 @@
#'local-time:timestamp<
:key #'created-at)))
(markdownify-comment-bodies comments)
(who:htm
(:ol
:class "issue-history"
(dolist (item history)
(render/issue-history-item item))
(when *user*
(render/new-comment (id issue))))))))))
(when (or history *user*)
(who:htm
(:ol
:class "issue-history"
(dolist (item history)
(render/issue-history-item item))
(when *user*
(render/new-comment (id issue)))))))))))
(defun render/not-found (entity-type)
(render ()