Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(issues): remove duplicate emoji reaction entry from comment header (#4068)

Jiayuan Zhang7d28b5a040bd
diff --git a/packages/ui/components/common/reaction-bar.tsx b/packages/ui/components/common/reaction-bar.tsx
index 12a05c852a..1b57305c67 100644
--- a/packages/ui/components/common/reaction-bar.tsx
+++ b/packages/ui/components/common/reaction-bar.tsx
@@ -40,7 +40,6 @@ interface ReactionBarProps {
onToggle: (emoji: string) => void;
getActorName: (type: string, id: string) => string;
className?: string;
- hideAddButton?: boolean;
}
function ReactionBar({
@@ -49,7 +48,6 @@ function ReactionBar({
onToggle,
getActorName,
className,
- hideAddButton,
}: ReactionBarProps) {
const grouped = groupReactions(reactions, currentUserId);
@@ -78,7 +76,7 @@ function ReactionBar({
</TooltipContent>
</Tooltip>
))}
- {!hideAddButton && <QuickEmojiPicker onSelect={onToggle} />}
+ <QuickEmojiPicker onSelect={onToggle} />
</div>
);
}
diff --git a/packages/views/issues/components/comment-card.tsx b/packages/views/issues/components/comment-card.tsx
index 8ddbea5783..b7f36b8639 100644
--- a/packages/views/issues/components/comment-card.tsx
+++ b/packages/views/issues/components/comment-card.tsx
@@ -26,7 +26,6 @@ import {
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from "@multica/ui/components/ui/collapsible";
import { ActorAvatar } from "../../common/actor-avatar";
import { ReactionBar } from "@multica/ui/components/common/reaction-bar";
-import { QuickEmojiPicker } from "@multica/ui/components/common/quick-emoji-picker";
import { cn } from "@multica/ui/lib/utils";
import { copyText } from "@multica/ui/lib/clipboard";
import { useActorName } from "@multica/core/workspace/hooks";
@@ -400,8 +399,6 @@ function CommentRow({
const [confirmDelete, setConfirmDelete] = useState(false);
const reactions = entry.reactions ?? [];
- const contentText = entry.content ?? "";
- const isLongContent = contentText.length > 500 || contentText.split("\n").length > 8;
return (
<div className="py-1.5">
@@ -437,10 +434,6 @@ function CommentRow({
)}
<div className="ml-auto flex items-center gap-0.5">
- <QuickEmojiPicker
- onSelect={(emoji) => onToggleReaction(entry.id, emoji)}
- align="end"
- />
<DropdownMenu>
<DropdownMenuTrigger
render={
@@ -563,7 +556,6 @@ function CommentRow({
currentUserId={currentUserId}
onToggle={(emoji) => onToggleReaction(entry.id, emoji)}
getActorName={getActorName}
- hideAddButton={!isLongContent}
className="mt-1.5 pl-12 pr-4"
/>
</>
@@ -612,8 +604,6 @@ function CommentCardImpl({
const replyCount = allNestedReplies.length;
const contentPreview = (entry.content ?? "").replace(/\n/g, " ").slice(0, 80);
const reactions = entry.reactions ?? [];
- const contentText = entry.content ?? "";
- const isLongContent = contentText.length > 500 || contentText.split("\n").length > 8;
const isHighlighted = highlightedCommentId === entry.id;
@@ -709,10 +699,6 @@ function CommentCardImpl({
{open && (
<div className="ml-auto flex items-center gap-0.5">
- <QuickEmojiPicker
- onSelect={(emoji) => onToggleReaction(entry.id, emoji)}
- align="end"
- />
<DropdownMenu>
<DropdownMenuTrigger
render={
@@ -844,7 +830,6 @@ function CommentCardImpl({
currentUserId={currentUserId}
onToggle={(emoji) => onToggleReaction(entry.id, emoji)}
getActorName={getActorName}
- hideAddButton={!isLongContent}
className="mt-1.5 pl-10"
/>
</>