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

Only render ~20 most recent messages #55

Open
reichert621 opened this issue Sep 29, 2020 · 2 comments
Open

Only render ~20 most recent messages #55

reichert621 opened this issue Sep 29, 2020 · 2 comments

Comments

@reichert621
Copy link
Collaborator

reichert621 commented Sep 29, 2020

(Note: the code for this lives in the https://github.com/papercups-io/chat-window repo)

Only load the remaining messages if the customer scrolls up.

The problem we're trying to solve is that when too many messages are rendered, it slows down the animation of new messages being displays. So my thinking is that even if we have 100 messages in this.state.messages, we don't need to render them all.

Open to other solutions as well!

@pandurijal
Copy link

Hello, I am interested to pick this issue, but could you specify on which file those messages are rendered?

@reichert621
Copy link
Collaborator Author

hey @pandurijal! this might be a bit tricky to tackle, but if you're willing to give it a shot the code lives in the https://github.com/papercups-io/chat-window repo in this component: https://github.com/papercups-io/chat-window/blob/master/components/ChatWindow.tsx#L691

here are some instructions for getting setup for development: https://github.com/papercups-io/chat-widget#development

but let me know if you need any help or have any questions!

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

No branches or pull requests

2 participants