Skip to content
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

Ability to disable auto scroll #629

Open
JHubi1 opened this issue Aug 22, 2024 · 3 comments
Open

Ability to disable auto scroll #629

JHubi1 opened this issue Aug 22, 2024 · 3 comments
Labels
feature New feature or request

Comments

@JHubi1
Copy link

JHubi1 commented Aug 22, 2024

Is your feature request related to a problem?

At the moment, the chat view always scrolls to the bottom of the latest message if one is updated. In general, that is great, but there might be a situation in which a different behavior is needed.

What solution would you suggest?

I'd like to see a property value like autoscroll which is set to true by default and that toggles the scrolling to the bottom.

Code snippets 📝

Chat(
  messages: messages,
  key: chatKey,
  autoscroll: false
)

Is there any additional solution to that?

The function that scrolls to the bottom is made to an argument, so it can be overwritten with an empty function and the scroll would be disabled as well.

Code snippets 📝

Chat(
  messages: messages,
  key: chatKey,
  onNewMessage: (id) {}
)

Related issues/PRs

Issue #354 mentions the issue, but doesn't go into detail.

@JHubi1 JHubi1 added the feature New feature or request label Aug 22, 2024
@demchenkoalex
Copy link
Member

everything is going to v2 now, lately I have been working 2-3 hours a day for the past 2 weeks or so, with ai agent example as well, so it will be miles better for ai

@chechoora
Copy link

Hello, can you give us basic idea on how you gonna do it in v2? We are using v1.6 and we need to emulate ChatGPT and OpenAI bot SSE responses. I am not sure it possible to do it, without forking your package since the issue is not with scrolling, but rather with CustomScrollView. Maybe you can give us an idea. Thanks!

@demchenkoalex
Copy link
Member

Hey, there is no simple answer, I removed all code and started from scratch :) I already have working SSE responses on v2 branch. What is left for me is to add some basic customisation for text messages and I will release an alpha version. I hope to do finish it next week. If you can't wait you can try to grab v2 branch as an example, it will be miles better than what you see on main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants