FAForever / downlords-faf-client

Official client for Forged Alliance Forever
https://faforever.com
MIT License
196 stars 121 forks source link

Chat jumps when you send a message #3154

Open Garanas opened 6 months ago

Garanas commented 6 months ago

Describe the bug

Chat jumps when a message is send by the user.

To Reproduce

Wait until there's need for a scrollbar and then send a message.

Expected behavior

It to not jump.

https://github.com/FAForever/downlords-faf-client/assets/15778155/4201d81e-954e-4373-bc1c-13bd364984de

Ivan-Shaml commented 1 month ago

Hi,

Doesn't this change (ChatMessageViewController:348 in commit) happen to fix the issue? I also couldn't reproduce it with the latest version (2024.8.0).

Sheikah45 commented 1 month ago

Unfortunately in my experience it still happens for some users sometimes

sulikdan commented 1 week ago

Could someone describe this in better detail? I see multiple scenarios and I feel, if im gonna fix one, another will fall apart. Situations(assuming that chat is full of messages and scrollbar is visible):

Ad2: Do we assuming same results, when a message is send either from other users or the client user?

I'm wondering, if the fix should also introduce button like the intellij has for logs (scroll to end)

Sheikah45 commented 1 week ago

It is supposed to work like discord chat. When a user is already at the bottom of the chat it should scroll up to include the most recent message when a new message is received. When a user is not at the bottom of the chat it should not scroll and should preserve their location in the chat window.

When the user themself sends a message it scrolls to the bottom no matter where they are.