mirror of
https://seed.radicle.dev/rad:z4D5UCArafTzTQpDZNQRuqswh3ury.git
synced 2026-11-21 10:40:41 +08:00
Say who resolved a comment
The comment records only that it is resolved, so the name comes from the resolve operation in the patch's log. Adds the action to timeline threads too, and shapes the badge like a review's verdict.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
import type { Config } from "@bindings/config/Config";
|
||||
|
||||
import type { CodeComments } from "@app/lib/codeComments";
|
||||
import type { Resolution } from "@app/lib/commentResolutions";
|
||||
import { diffOptions } from "@app/lib/diffOptions.svelte";
|
||||
import { cachedGetDiffText } from "@app/lib/invoke";
|
||||
import { sliceForRange } from "@app/lib/patchSlice";
|
||||
@@ -36,6 +37,14 @@
|
||||
authors: Author[],
|
||||
reaction: string,
|
||||
) => Promise<void>;
|
||||
changeCommentStatus?: (
|
||||
commentId: string,
|
||||
resolved: boolean,
|
||||
) => Promise<void>;
|
||||
// Whether the protocol lets the reader resolve a given comment. Without it
|
||||
// the action is hidden, which is what a standalone revision comment gets.
|
||||
canResolveComment?: (commentId: string) => boolean;
|
||||
resolvedBy?: (commentId: string) => Resolution | undefined;
|
||||
}
|
||||
|
||||
const {
|
||||
@@ -49,6 +58,9 @@
|
||||
editComment,
|
||||
deleteComment,
|
||||
reactOnComment,
|
||||
changeCommentStatus,
|
||||
canResolveComment,
|
||||
resolvedBy,
|
||||
}: Props = $props();
|
||||
|
||||
const noop = () => Promise.resolve();
|
||||
@@ -69,6 +81,9 @@
|
||||
editComment: editComment ?? noop,
|
||||
deleteComment,
|
||||
reactOnComment,
|
||||
changeCommentStatus,
|
||||
canResolveComment,
|
||||
resolvedBy,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user