Radish alpha
r
rad:z4D5UCArafTzTQpDZNQRuqswh3ury
Radicle desktop app
Radicle
Git
Navigate users to latest revision of a patch
Merged did:key:z6MkkfM3...sVz5 opened 1 year ago

EDIT: Moved the patch to draft state, since we eventually want to get the user to the latest revision of a delegate or patch author

Instead of displaying the first revision of a patch, we should in general send users to the latest revision of a patch and let user then decide if they want to get more context.

checkcheck-unit-testcheck-e2e

👉 Workflow runs 👉 Branch on GitHub

1 file changed +4 -2 618ae682 31b2d9a9
modified src/views/repo/Patch.svelte
@@ -80,7 +80,9 @@
  let updatedTitle = $state("");
  let labelSaveInProgress: boolean = $state(false);
  let assigneesSaveInProgress: boolean = $state(false);
-
  let tab: "patch" | "revisions" | "timeline" = $state("patch");
+
  let tab: "patch" | "revisions" | "timeline" = $state(
+
    revisions.length > 1 ? "revisions" : "patch",
+
  );
  let selectedRevision: Revision = $state(revisions.slice(-1)[0]);

  $effect(() => {
@@ -93,7 +95,7 @@
    // eslint-disable-next-line @typescript-eslint/no-unused-expressions
    patch.id;

-
    tab = "patch";
+
    tab = revisions.length > 1 ? "revisions" : "patch";
    editingTitle = false;
    updatedTitle = patch.title;
    selectedRevision = revisions.slice(-1)[0];