-
-
Notifications
You must be signed in to change notification settings - Fork 334
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
Limit chat input height to 20 lines #877
Conversation
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.
@krassowski Thank you for opening this PR! I just pushed a commit that binds the "Send" button to the bottom of the chat input to prevent it from moving as a user types a long prompt. Avoiding excessive movement of UI elements is better for user experience, in my opinion.
Two questions:
- Can you test this PR w/ my additional commit to ensure it works on your browsers as well?
- Do you know why the scrollbar is not showing in Firefox, per your screenshot in the description of this PR?
The scrollbar is there, just only showing on hover. Firefox (at least on Ubuntu) uses so called |
Done, looks good to me! |
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.
@krassowski Awesome, thank you! Merging.
* Limit the number of displayed rows in chat input to 20 * affix send button to bottom of chat input --------- Co-authored-by: David L. Qiu <david@qiu.dev>
Fixes #796
Why 20? Because in my testing I saw that:
I think it is better to go with a larger number. I am happy to change it to a different number based on review though :)
As to the visible scrollbar in Chrome:
scrollbar-width: thin
or change the side of the scrollbar (here simulated withdirection: rtl; text-align: left;
trick, but it is not accessible; there is a clean solution but mui does not support it)Alternatively we could move it to the right of the send button by reimplementing
endAdornment
as an element placed outside; this is trivial by making itposition: absolute; right: 20px
but would need some background to cover the text which might be underneath:While covering some text might be annoying at times, this could be a good tradeoff as it would increase the width available for the user prompt.