refactor: enhance comment components with improved styles and functionality

- Updated placeholder text in CommentComposer for clarity.
- Implemented auto-resizing for the textarea in CommentComposer.
- Adjusted styles for CommentPanel and CommentSheet for better layout and usability.
- Enhanced CommentActions button visibility on hover for improved interaction.
- Refined comment item display logic to simplify user experience.
This commit is contained in:
Anish Sarkar 2026-01-20 19:49:34 +05:30
parent 26ca751a9d
commit 3fb83e4c3a
8 changed files with 84 additions and 75 deletions

View file

@ -1,6 +1,6 @@
"use client";
import { MessageSquare } from "lucide-react";
import { MessageSquarePlus } from "lucide-react";
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
import type { CommentTriggerProps } from "./types";
@ -25,7 +25,7 @@ export function CommentTrigger({ commentCount, isOpen, onClick, disabled }: Comm
)}
onClick={onClick}
>
<MessageSquare className={cn("size-5", (hasComments || isOpen) && "fill-current")} />
<MessageSquarePlus className={cn("size-5", (hasComments || isOpen) && "fill-current")} />
{hasComments && (
<span className="absolute -top-1 -right-1 flex size-5 items-center justify-center rounded-full bg-primary text-[10px] font-bold text-primary-foreground">
{commentCount > 9 ? "9+" : commentCount}