Radish alpha
r
rad:z4D5UCArafTzTQpDZNQRuqswh3ury
Radicle desktop app
Radicle
Git
Tweak issue view
Open rudolfs opened 1 year ago

See individual commits for details.

check check-e2e

👉 Workflow runs 👉 Branch on GitHub

1 file changed +38 -21 84fbb1cf 52c25a90
modified src/views/repo/Issue.svelte
@@ -115,6 +115,12 @@
        new: { id: issue.id, body, embeds },
        opts: { announce: $announce },
      });
+
      // Update second column issue comment count without reloading the whole
+
      // issue list.
+
      const issueIndex = issues.findIndex(i => i.id === issue.id);
+
      if (issueIndex !== -1) {
+
        issues[issueIndex].commentCount += 1;
+
      }
    } catch (error) {
      console.error("Comment creation failed: ", error);
    } finally {
@@ -129,6 +135,12 @@
        new: { id: issue.id, body, embeds, replyTo },
        opts: { announce: $announce },
      });
+
      // Update second column issue comment count without reloading the whole
+
      // issue list.
+
      const issueIndex = issues.findIndex(i => i.id === issue.id);
+
      if (issueIndex !== -1) {
+
        issues[issueIndex].commentCount += 1;
+
      }
    } catch (error) {
      console.error("Comment reply creation failed", error);
    } finally {
@@ -173,8 +185,7 @@
        },
        opts: { announce: $announce },
      });
-
      issue.title = updatedTitle;
-
      // Update second colum issue title without reloading the whole issue list.
+
      // Update second column issue title without reloading the whole issue list.
      const issueIndex = issues.findIndex(i => i.id === issue.id);
      if (issueIndex !== -1) {
        issues[issueIndex].title = updatedTitle;
@@ -182,6 +193,8 @@
      editingTitle = false;
    } catch (error) {
      console.error("Issue editing failed: ", error);
+
    } finally {
+
      await reload();
    }
  }

@@ -242,11 +255,11 @@
    font-weight: var(--font-weight-medium);
    -webkit-user-select: text;
    user-select: text;
-
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    word-break: break-all;
+
    padding-top: 4px;
  }
  .issue-body {
    margin-top: 1rem;
@@ -284,25 +297,29 @@

<Layout>
  {#snippet breadcrumbs()}
-
    <Link route={{ resource: "home" }}>
-
      <NodeId
-
        publicKey={config.publicKey}
-
        alias={config.alias}
-
        styleFontFamily="var(--font-family-sans-serif)"
-
        styleFontSize="var(--font-size-tiny)" />
-
    </Link>
-
    <Link route={{ resource: "repo.issues", rid: repo.rid, status: "open" }}>
-
      <div class="global-flex">
-
        <Icon name="chevron-right" />
-
        {project.data.name}
+
    <div class="global-flex txt-overflow">
+
      <Link route={{ resource: "home" }}>
+
        <NodeId
+
          publicKey={config.publicKey}
+
          alias={config.alias}
+
          styleFontFamily="var(--font-family-sans-serif)"
+
          styleFontSize="var(--font-size-tiny)" />
+
      </Link>
+
      <Link route={{ resource: "repo.issues", rid: repo.rid, status: "open" }}>
+
        <div class="global-flex">
+
          <Icon name="chevron-right" />
+
          {project.data.name}
+
        </div>
+
      </Link>
+
      <Icon name="chevron-right" />
+
      <Link route={{ resource: "repo.issues", rid: repo.rid, status: "open" }}>
+
        Issues
+
      </Link>
+
      <Icon name="chevron-right" />
+
      <div class="txt-overflow">
+
        {issue.title}
      </div>
-
    </Link>
-
    <Icon name="chevron-right" />
-
    <Link route={{ resource: "repo.issues", rid: repo.rid, status: "open" }}>
-
      Issues
-
    </Link>
-
    <Icon name="chevron-right" />
-
    {issue.title}
+
    </div>
  {/snippet}

  {#snippet headerCenter()}