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

bug: Chat Component Re-renders and Causes Layout Shifts on Small Screens #2609

Open
lildinozzz opened this issue Jan 17, 2025 · 1 comment
Open
Labels

Comments

@lildinozzz
Copy link

When opening the chat on smartphones, after the component is mounted, a re-render occurs, causing the message list to jump to the middle of the conversation. This results in an unpleasant lag or jump, affecting the user experience.

To Reproduce

Steps to reproduce the behavior:

  1. Open the chat on a smartphone.
  2. Wait for the component to mount.
  3. Ensure there are many messages in the conversation.
  4. Observe the message list jumping to the middle of the conversation after re-rendering.
  5. Feel the slight lag or visual jump.

Expected behavior
The message list should remain at the last message without shifting or jumping after the component is mounted and re-rendered.

Component Mounts:
Image

After 1 second:
Image

Package version
"stream-chat": "^8.47.1",
"stream-chat-react": "^12.8.1",

Smartphone (please complete the following information):
Device: iPhone 15 Pro
OS: iOS (latest version)
Browser: Chrome, Safari (latest versions)

The issue occurs specifically on smartphones, with recent versions of Chrome and Safari browsers. After the chat component mounts, the message list jumps to the middle of the conversation, creating an unpleasant feeling of lag or stuttering.

@lildinozzz lildinozzz added bug Something isn't working status: unconfirmed labels Jan 17, 2025
@arnautov-anton
Copy link
Contributor

Hey, @lildinozzz, could you please specify which message list component you're using? Our SDK allows our integrators to choose between VirtualizedMessageList and MessageList.

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

No branches or pull requests

2 participants