mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
🪄 style: Improved Input Collapse UI (#10659)
* feat: shift collapse chevron inside ChatForm input area * feat: add soft gradient on bottom of collapsed text input so there isn't a hard cut off when text overflows * feat: add better scroll bar behavior for main chat input * fix: smooth out purple gradient for temporary chats * feat: better colors for gradient * feat: use blur instead of colors * chore: address copilot comments
This commit is contained in:
parent
30df16f5b5
commit
8b7af65265
2 changed files with 63 additions and 30 deletions
|
|
@ -260,11 +260,13 @@ const ChatForm = memo(({ index = 0 }: { index?: number }) => {
|
||||||
<FileFormChat conversation={conversation} />
|
<FileFormChat conversation={conversation} />
|
||||||
{endpoint && (
|
{endpoint && (
|
||||||
<div className={cn('flex', isRTL ? 'flex-row-reverse' : 'flex-row')}>
|
<div className={cn('flex', isRTL ? 'flex-row-reverse' : 'flex-row')}>
|
||||||
|
<div className="relative flex-1">
|
||||||
<TextareaAutosize
|
<TextareaAutosize
|
||||||
{...registerProps}
|
{...registerProps}
|
||||||
ref={(e) => {
|
ref={(e) => {
|
||||||
ref(e);
|
ref(e);
|
||||||
(textAreaRef as React.MutableRefObject<HTMLTextAreaElement | null>).current = e;
|
(textAreaRef as React.MutableRefObject<HTMLTextAreaElement | null>).current =
|
||||||
|
e;
|
||||||
}}
|
}}
|
||||||
disabled={disableInputs || isNotAppendable}
|
disabled={disableInputs || isNotAppendable}
|
||||||
onPaste={handlePaste}
|
onPaste={handlePaste}
|
||||||
|
|
@ -287,10 +289,21 @@ const ChatForm = memo(({ index = 0 }: { index?: number }) => {
|
||||||
className={cn(
|
className={cn(
|
||||||
baseClasses,
|
baseClasses,
|
||||||
removeFocusRings,
|
removeFocusRings,
|
||||||
'transition-[max-height] duration-200 disabled:cursor-not-allowed',
|
'scrollbar-hover transition-[max-height] duration-200 disabled:cursor-not-allowed',
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<div className="flex flex-col items-start justify-start pt-1.5">
|
{isCollapsed && (
|
||||||
|
<div
|
||||||
|
className="pointer-events-none absolute bottom-0 left-0 right-0 h-10 transition-all duration-200"
|
||||||
|
style={{
|
||||||
|
backdropFilter: 'blur(2px)',
|
||||||
|
WebkitMaskImage: 'linear-gradient(to top, black 15%, transparent 75%)',
|
||||||
|
maskImage: 'linear-gradient(to top, black 15%, transparent 75%)',
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col items-start justify-start pr-2.5 pt-1.5">
|
||||||
<CollapseChat
|
<CollapseChat
|
||||||
isCollapsed={isCollapsed}
|
isCollapsed={isCollapsed}
|
||||||
isScrollable={isMoreThanThreeRows}
|
isScrollable={isMoreThanThreeRows}
|
||||||
|
|
|
||||||
|
|
@ -1487,6 +1487,26 @@ button {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Show scrollbar only on hover */
|
||||||
|
.scrollbar-hover {
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: transparent transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scrollbar-hover:hover {
|
||||||
|
scrollbar-color: var(--border-medium) transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scrollbar-hover::-webkit-scrollbar-thumb {
|
||||||
|
background-color: transparent;
|
||||||
|
transition: background-color 0.3s ease 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scrollbar-hover:hover::-webkit-scrollbar-thumb {
|
||||||
|
background-color: var(--border-medium);
|
||||||
|
transition-delay: 0s;
|
||||||
|
}
|
||||||
|
|
||||||
body,
|
body,
|
||||||
html {
|
html {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue