-
-
Notifications
You must be signed in to change notification settings - Fork 730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: scroll-related UX adjustments in the Unleash AI chat #8478
chore: scroll-related UX adjustments in the Unleash AI chat #8478
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks complicated but I'm ok with it. Just leaving some comments, waiting for the build to succeed (in case changes are significant)
frontend/src/component/ai/AIChat.tsx
Outdated
} | ||
|
||
return () => { | ||
if (target) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be like this? target will get a reference to the target and the function will just keep it referenced
if (target) { | |
if (chatEndRef.current) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I simplified this to always use the ref: 8d473e1
@@ -153,7 +180,7 @@ export const AIChat = () => { | |||
minSize={{ width: '270px', height: '200px' }} | |||
maxSize={{ width: '90vw', height: '90vh' }} | |||
defaultSize={{ width: '320px', height: '450px' }} | |||
onResize={scrollToEnd} | |||
onResize={() => scrollToEnd({ onlyIfAtEnd: true })} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we always scroll to end when resizing? I mean if you scroll up on a conversation and then resize...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's why we have onlyIfAtEnd: true
. This is actually an improvement on: #8456 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
https://linear.app/unleash/issue/2-2857/make-some-scroll-related-ux-adjustments-to-the-unleash-ai-chat
Introduces scroll-related UX enhancements to the Unleash AI chat, providing a smoother and more refined user experience.