feat: add gist comment form and extend comment container selector to include gist-card

Add the comment form inclusion to the gist card template by setting the target uid and type variables before rendering the shared `_comment_form.html` partial. Also update the `CommentManager.js` closest selector to include `.gist-card` alongside `.post-card` and `.comments-section`, ensuring the comment source lookup works correctly for gist comment forms.
This commit is contained in:
2026-06-15 16:38:32 +00:00
parent 6b08761af5
commit 5dd2126511
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ export class CommentManager {
return;
}
const container = comment.closest(".post-card, .comments-section");
const container = comment.closest(".post-card, .gist-card, .comments-section");
const source = container && container.querySelector(".comment-form:not(.comment-reply-form)");
if (!source) return;
const targetUid = source.querySelector('input[name="target_uid"]').value;