1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00

chore: Unleash AI chat UX bug fixes (#8488)

https://linear.app/unleash/issue/2-2859/small-ux-bug-fixes-on-the-unleash-ai-chat

Bug fixes:

- Up and down arrow keys not functioning in multiline input
- Multiline input expanding beyond the intended size limit
- Chat window failing to properly scroll to the bottom when opened
This commit is contained in:
Nuno Góis 2024-10-21 08:38:28 +01:00 committed by GitHub
parent 0a815e734a
commit 0f3e7ec7e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -107,7 +107,9 @@ export const AIChat = () => {
};
useEffect(() => {
scrollToEnd();
requestAnimationFrame(() => {
scrollToEnd();
});
const intersectionObserver = new IntersectionObserver(
([entry]) => {

View File

@ -81,10 +81,11 @@ export const AIChatInput = ({
placeholder='Type your message here'
fullWidth
multiline
maxRows={20}
maxRows={5}
value={message}
onChange={(e) => setMessage(e.target.value)}
onKeyDown={(e) => {
e.stopPropagation();
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
send();