Radish alpha
r
rad:z4D5UCArafTzTQpDZNQRuqswh3ury
Radicle desktop app
Radicle
Git
Fixing some bugs around the repo listing
Merged did:key:z6MkkfM3...sVz5 opened 1 year ago
  • Fix showing onboarding instructions when there’s at least one repo in total
  • Remove unneccessary repo list reload
    • If there is at least one repo, we don’t need to reload the repo listing.
  • Always reload the correct repo listing
    • Don’t default to all repos for the repo listing reload, try to reload the repo listing according to the activeTab props and else go with all.

checkcheck-unit-testcheck-e2e

👉 Workflow runs 👉 Branch on GitHub

2 files changed +9 -8 ea2982fa 1f65bcdf
modified src/views/home/Repos.svelte
@@ -44,7 +44,7 @@
      if (lock) {
        return;
      }
-
      if (repos.length > 0) {
+
      if (repoCount.total > 0) {
        return;
      }
      lock = true;
@@ -63,7 +63,7 @@

  async function reload() {
    [repos, repoCount, config] = await Promise.all([
-
      invoke<RepoInfo[]>("list_repos", { show: "all" }),
+
      invoke<RepoInfo[]>("list_repos", { show: activeTab ?? "all" }),
      invoke<RepoCount>("repo_count"),
      invoke<Config>("config"),
    ]);
@@ -151,7 +151,7 @@
        </div>
      {/if}
    </div>
-
    {#if repos.length > 0}
+
    {#if repoCount.total > 0}
      {#if searchResults.length > 0}
        <div class="repo-grid">
          {#each searchResults as result}
@@ -179,7 +179,11 @@
            style:justify-content="center">
            <div class="txt-missing txt-small global-flex" style:gap="0.25rem">
              <Icon name="none" />
-
              No matching repositories.
+
              {#if repos.length > 0}
+
                No matching repositories.
+
              {:else}
+
                No repositories.
+
              {/if}
            </div>
          </div>
        </Border>
modified tests/e2e/repo/issue.spec.ts
@@ -41,10 +41,7 @@ test("creation of top level comments", async ({ page }) => {
    );
  await page.getByRole("button", { name: "icon-checkmark" }).click();
  await expect(
-
    page.getByRole("button", {
-
      name: "icon-issue Make sure that comment creation is working avatar palm opened 8faf9dc 6 months ago",
-
      exact: true,
-
    }),
+
    page.getByRole("button", { name: "icon-issue Make sure that" }),
  ).toBeVisible();
  await expect(
    page