feat(AIChatPanel): update GradualBlur component to enhance blur effect; adjust ScrollArea scrollbar class handling

This commit is contained in:
Roberto Musso
2026-02-28 22:47:09 +01:00
parent 444aa37be2
commit f767bb5175
3 changed files with 25 additions and 13 deletions

View File

@@ -204,19 +204,22 @@ export function AIChatPanel({
{/* Scrollable messages area */}
<div className="relative flex-1 min-h-0">
{/* Gradual blur at the top of messages */}
{/* Gradual blur at the bottom of messages */}
{hasMessages && (
<GradualBlur
position="top"
strength={2}
height="5rem"
divCount={6}
position="bottom"
strength={0.6}
height="4rem"
divCount={10}
curve="ease-out"
opacity={0.8}
zIndex={20}
/>
)}
<ScrollArea
className="h-full"
viewportRef={messagesContainerRef}
scrollbarClassName={hasMessages ? 'z-30' : undefined}
viewportClassName={
isHomePage && !hasMessages
? '[&>div]:!flex [&>div]:!flex-col [&>div]:!min-h-full [&>div]:!justify-center'
@@ -382,10 +385,9 @@ export function AIChatPanel({
</ScrollArea>
</div>
{/* Fixed input — pinned to the bottom (hidden on initial state) */}
{/* Fixed input — pinned to the bottom, above the blur */}
{hasMessages && (
<div className="absolute bottom-0 left-0 right-0 z-10 px-6 pb-5 pt-16 pointer-events-none">
<div className="absolute inset-x-0 top-0 h-full bg-gradient-to-b from-transparent via-background/60 to-background/90" />
<div className="absolute bottom-0 left-0 right-0 z-30 px-6 pb-5 pt-4 pointer-events-none">
<div className="relative pointer-events-auto mx-auto max-w-3xl">
<ChatInput
input={input}