refactor(ui): unify container layout and adjust spacing
- Use container utility class consistently across chat components - Change container max-width from 5xl to 4xl for better readability - Adjust message bubble padding (p-3 -> p-2) - Fix logout dropdown alignment and add destructive variant Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
0c5de3c5f4
commit
c6ca5f3270
5 changed files with 9 additions and 9 deletions
|
|
@ -284,8 +284,8 @@ export default function Layout() {
|
|||
</div>
|
||||
<ChevronsUpDown className="ml-auto size-4" />
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent side="top">
|
||||
<DropdownMenuItem onClick={handleLogout}>
|
||||
<DropdownMenuContent side="top" align="end">
|
||||
<DropdownMenuItem variant="destructive" onClick={handleLogout}>
|
||||
<LogOut className="size-4" />
|
||||
Log out
|
||||
</DropdownMenuItem>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { Skeleton } from "@multica/ui/components/ui/skeleton";
|
|||
/** Skeleton placeholder matching MessageList layout, shown while reconnecting */
|
||||
export function ChatSkeleton() {
|
||||
return (
|
||||
<div className="px-4 py-6 space-y-6 max-w-4xl mx-auto">
|
||||
<div className="container px-4 py-6 space-y-6">
|
||||
{/* Assistant message */}
|
||||
<div className="flex justify-start">
|
||||
<div className="w-full p-1 px-2.5 space-y-2">
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ export function ChatView({
|
|||
|
||||
<main ref={mainRef} className="flex-1 overflow-y-auto min-h-0" style={fadeStyle}>
|
||||
{isLoadingHistory && messages.length === 0 ? (
|
||||
<div className="px-4 py-6 max-w-4xl mx-auto">
|
||||
<div className="container px-4 py-6">
|
||||
{/* User bubble */}
|
||||
<div className="flex justify-end my-2">
|
||||
<Skeleton className="h-8 w-[30%] rounded-md" />
|
||||
|
|
@ -211,7 +211,7 @@ export function ChatView({
|
|||
)}
|
||||
<MessageList messages={messages} streamingIds={streamingIds} />
|
||||
{isLoading && streamingIds.size === 0 && pendingApprovals.length === 0 && (
|
||||
<div className="relative px-4 sm:px-10 max-w-4xl mx-auto">
|
||||
<div className="container relative px-4 sm:px-10">
|
||||
<div className="flex items-center gap-2 py-1 px-2.5 text-muted-foreground">
|
||||
<Spinner className="text-xs" />
|
||||
<span className="text-xs">Generating...</span>
|
||||
|
|
@ -219,7 +219,7 @@ export function ChatView({
|
|||
</div>
|
||||
)}
|
||||
{pendingApprovals.length > 0 && (
|
||||
<div className="relative px-4 max-w-4xl mx-auto">
|
||||
<div className="container relative px-4">
|
||||
{pendingApprovals.map((approval) => (
|
||||
<ExecApprovalItem
|
||||
key={approval.approvalId}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ export const MessageList = memo(function MessageList({ messages, streamingIds }:
|
|||
}, [messages])
|
||||
|
||||
return (
|
||||
<div className="container relative p-6 px-4 sm:px-10">
|
||||
<div className="container relative p-6">
|
||||
{messages.map((msg) => {
|
||||
// System messages (e.g. compaction notifications)
|
||||
if (msg.role === "system") {
|
||||
|
|
@ -125,7 +125,7 @@ export const MessageList = memo(function MessageList({ messages, streamingIds }:
|
|||
)}
|
||||
<div
|
||||
className={cn(
|
||||
msg.role === "user" ? "bg-muted rounded-md max-w-[60%] p-3 px-4" : "w-full p-3 my-1"
|
||||
msg.role === "user" ? "bg-muted rounded-md max-w-[60%] p-2 px-4" : "w-full p-2 my-1"
|
||||
)}
|
||||
>
|
||||
{isStreaming ? (
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@
|
|||
}
|
||||
|
||||
@utility container {
|
||||
@apply w-full max-w-5xl mx-auto;
|
||||
@apply w-full max-w-4xl mx-auto;
|
||||
}
|
||||
|
||||
@layer base {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue