Skip to content

Commit 766d02a

Browse files
style: improve the look of comments threads
1 parent bd1bd6e commit 766d02a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/routes/[pid=pid]/[org]/[repo]/[id=number]/PageRenderer.svelte

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,12 @@
298298
secondaryLabel="{info.comments} comment{info.comments > 1 ? 's' : ''}"
299299
>
300300
{#each comments as comment, i (comment.id)}
301-
{#if i > 0}
301+
{@const isAnswer =
302+
"parent_id" in comment && comment.parent_id ? comment.parent_id !== info.id : false}
303+
{#if !isAnswer && i > 0}
302304
<Separator class="my-2 h-1" />
303305
{/if}
304-
<div>
306+
<div class={[isAnswer && "border-l-4 ml-4 pl-2"]}>
305307
<!-- Author -->
306308
<div
307309
class="inline-flex w-full flex-col gap-1 border-b px-4 py-2 xs:flex-row xs:items-center xs:gap-0"

0 commit comments

Comments
 (0)