-
Notifications
You must be signed in to change notification settings - Fork 60.1k
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
Add settings to disable autoscroll during reply #3815
base: main
Are you sure you want to change the base?
Add settings to disable autoscroll during reply #3815
Conversation
This behaviour persists in latest 2.10.3, mac m1 Sonoma 14.2.1 |
Yep, this will persist until this PR is merged or until the authors implement their own scroll controller. |
tbh this pretty useful but, I don't think so this pr will be merged, since the owner of this repository has changed. |
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.
Just info
@@ -379,12 +379,13 @@ function useScrollToBottom() { | |||
// for auto-scroll | |||
const scrollRef = useRef<HTMLDivElement>(null); | |||
const [autoScroll, setAutoScroll] = useState(true); | |||
|
|||
const config = useAppConfig(); | |||
let isAutoScrollEnabled: boolean = config.autoScrollMessage; | |||
function scrollDomToBottom() { | |||
const dom = scrollRef.current; | |||
if (dom) { | |||
requestAnimationFrame(() => { |
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.
Just info
this requestAnimationFrame
stupid complex that made performance in browser bad when there is lots of messages
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 don't know this repo much, but I think they've added this recently to make the show text animation smoother. If this impacts performance so bad, I guess it should be either an option or omitted completely.
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 don't know this repo much, but I think they've added this recently to make the show text animation smoother. If this impacts performance so bad, I guess it should be either an option or omitted completely.
nah this already useful which can customize the only things need to improvement it's only requestAnimationFrame
<< stupid typescript function
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 was looking around it yesterday trying to Improve it
Why does the owner change would prevent them from merging it? |
I have no idea |
Btw you did a great work with your fork. I like the search bar in the chat list! |
it was created by now still focusing to improve a local storage in browser |
Thx! Can you clarify/link to how? Im asking CGPT and getting a bit lost |
@movalex I've cherry-picked your PR into my fork. It's quite useful. |
@movalex I've cherry-picked your PR into my fork. It's quite useful. |
* add menu settings and a rough translation * autoscroll enabled by default * update autoscroll config * use config to drive autoscroll state * update locales * Update pt.ts * check scroll on hit bottom * Feat [UI/UX] [Front End] [Chat] smooth scrolling - [+] feat(chat.tsx): implement smooth scrolling behavior in chat component Note: This adding back smooth scrolling --------- Co-authored-by: movalex <[email protected]> Co-authored-by: movalex <[email protected]>
@movalex is attempting to deploy a commit to the NextChat Team on Vercel. A member of the Team first needs to authorize it. |
Your build has completed! |
Regarding #3324 and #3780
Auto-scroll is enabled by default, but now you can disable scrolling during GPT reply.
Current behavior: scrolling always enabled, so on a small screen the text scrolls too fast to be readable.
What's changed: With Autoscroll Message disabled, the generation would continue beyond the screen, while you can read and scroll the text as you'd like. Ideally would be better to stop the scrolling by dragging up/down. But I guess this also works.
Please also check the menu translation, I've just asked GPT to translate those.