refactor(issues): use ReadonlyContent for comment readonly display
Replace ContentEditor editable={false} with lightweight ReadonlyContent
in comment cards. Each comment no longer creates a full ProseMirror
instance for readonly display.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4df32a853b
commit
92e76dea81
1 changed files with 3 additions and 3 deletions
|
|
@ -30,7 +30,7 @@ import { QuickEmojiPicker } from "@/components/common/quick-emoji-picker";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { useActorName } from "@/features/workspace";
|
import { useActorName } from "@/features/workspace";
|
||||||
import { timeAgo } from "@/shared/utils";
|
import { timeAgo } from "@/shared/utils";
|
||||||
import { ContentEditor, type ContentEditorRef, copyMarkdown } from "@/features/editor";
|
import { ContentEditor, type ContentEditorRef, copyMarkdown, ReadonlyContent } from "@/features/editor";
|
||||||
import { FileUploadButton } from "@/components/common/file-upload-button";
|
import { FileUploadButton } from "@/components/common/file-upload-button";
|
||||||
import { useFileUpload } from "@/shared/hooks/use-file-upload";
|
import { useFileUpload } from "@/shared/hooks/use-file-upload";
|
||||||
import { ReplyInput } from "./reply-input";
|
import { ReplyInput } from "./reply-input";
|
||||||
|
|
@ -247,7 +247,7 @@ function CommentRow({
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<div className="mt-1.5 pl-8 text-sm leading-relaxed text-foreground/85">
|
<div className="mt-1.5 pl-8 text-sm leading-relaxed text-foreground/85">
|
||||||
<ContentEditor defaultValue={entry.content ?? ""} editable={false} />
|
<ReadonlyContent content={entry.content ?? ""} />
|
||||||
</div>
|
</div>
|
||||||
{!isTemp && (
|
{!isTemp && (
|
||||||
<ReactionBar
|
<ReactionBar
|
||||||
|
|
@ -455,7 +455,7 @@ function CommentCard({
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<div className="pl-10 text-sm leading-relaxed text-foreground/85">
|
<div className="pl-10 text-sm leading-relaxed text-foreground/85">
|
||||||
<ContentEditor defaultValue={entry.content ?? ""} editable={false} />
|
<ReadonlyContent content={entry.content ?? ""} />
|
||||||
</div>
|
</div>
|
||||||
{!isTemp && (
|
{!isTemp && (
|
||||||
<ReactionBar
|
<ReactionBar
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue