-
-
Notifications
You must be signed in to change notification settings - Fork 740
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: make the Unleash AI chat resizable #8456
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 |
minSize={{ width: '270px', height: '200px' }} | ||
maxSize={{ width: '90vw', height: '90vh' }} | ||
defaultSize={{ width: '320px', height: '450px' }} | ||
onResize={scrollToEnd} |
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.
I can see cases where this would be annoying, ie you scroll up in history and then resize to read something without too many line breaks. But not sure the need would arise in here
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.
If you try this locally I think you'll understand why I did this. If we don't do something like this, whenever you resize, the conversation content container will anchor to the top left.
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.
I'll keep it for now but we can remove this behavior if we get feedback about it.
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.
Nice, weird that there's no good component for this already in MUI
Honestly, I didn’t check MUI before starting this implementation, but from what I can tell, it doesn’t seem like there’s a built-in component for this. The resizing behavior we’re going for is a bit niche, so it’s not something you see commonly implemented in web UI libraries. |
https://linear.app/unleash/issue/2-2840/make-the-unleash-ai-chat-window-resizable
This PR makes the Unleash AI chat resizable, providing users with a flexible way to adjust the chat window's size.
Implements a reusable
Resizable
wrapper component that allows configuration of:Double-clicking any resize handler maximizes the container along that axis (or both, if it's a corner). If the container is already maximized, double-clicking again will revert it to the default size.