Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Move reviews above discussion
Rūdolfs Ošiņš committed 1 year ago
commit f58eb32e1c5849539b131fa964dc06e5377a93c0
parent 42ab1462eaeffe1a50c3975137919ee965f4e07a
1 file changed +41 -41
modified src/components/Revision.svelte
@@ -362,47 +362,6 @@
</div>

<div style:margin="1rem 0">
-
  <div class="global-flex" style:margin-bottom="1rem">
-
    <NakedButton
-
      stylePadding="0 4px"
-
      variant="ghost"
-
      onclick={() => (hideDiscussion = !hideDiscussion)}>
-
      <Icon name={hideDiscussion ? "chevron-right" : "chevron-down"} />
-
      <div class="txt-semibold global-flex txt-regular">Discussion</div>
-
    </NakedButton>
-
  </div>
-
  <div class:hide={hideDiscussion}>
-
    {#each threads as thread}
-
      <ThreadComponent
-
        {thread}
-
        {rid}
-
        canEditComment={partial(
-
          roles.isDelegateOrAuthor,
-
          config.publicKey,
-
          repoDelegates.map(delegate => delegate.did),
-
        )}
-
        editComment={partial(editComment)}
-
        createReply={partial(createReply)}
-
        reactOnComment={partial(reactOnComment, config.publicKey)} />
-
      <div class="connector"></div>
-
    {/each}
-

-
    <div id={`reply-${patchId}`}>
-
      <CommentToggleInput
-
        disallowEmptyBody
-
        {rid}
-
        focus={focusReply}
-
        onexpand={toggleReply}
-
        onclose={topLevelReplyOpen
-
          ? () => (topLevelReplyOpen = false)
-
          : undefined}
-
        placeholder="Leave a comment"
-
        submit={partial(createComment)} />
-
    </div>
-
  </div>
-
</div>
-

-
<div style:margin="1rem 0">
  <div class="review-row">
    <div
      class="global-flex"
@@ -454,6 +413,47 @@
  {/if}
</div>

+
<div style:margin="1rem 0">
+
  <div class="global-flex" style:margin-bottom="1rem">
+
    <NakedButton
+
      stylePadding="0 4px"
+
      variant="ghost"
+
      onclick={() => (hideDiscussion = !hideDiscussion)}>
+
      <Icon name={hideDiscussion ? "chevron-right" : "chevron-down"} />
+
      <div class="txt-semibold global-flex txt-regular">Discussion</div>
+
    </NakedButton>
+
  </div>
+
  <div class:hide={hideDiscussion}>
+
    {#each threads as thread}
+
      <ThreadComponent
+
        {thread}
+
        {rid}
+
        canEditComment={partial(
+
          roles.isDelegateOrAuthor,
+
          config.publicKey,
+
          repoDelegates.map(delegate => delegate.did),
+
        )}
+
        editComment={partial(editComment)}
+
        createReply={partial(createReply)}
+
        reactOnComment={partial(reactOnComment, config.publicKey)} />
+
      <div class="connector"></div>
+
    {/each}
+

+
    <div id={`reply-${patchId}`}>
+
      <CommentToggleInput
+
        disallowEmptyBody
+
        {rid}
+
        focus={focusReply}
+
        onexpand={toggleReply}
+
        onclose={topLevelReplyOpen
+
          ? () => (topLevelReplyOpen = false)
+
          : undefined}
+
        placeholder="Leave a comment"
+
        submit={partial(createComment)} />
+
    </div>
+
  </div>
+
</div>
+

<div
  class="txt-semibold global-flex"
  style:margin-bottom={hideChanges ? undefined : "1rem"}>