-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Read receipt animation sometimes has holes in it #9769
Read receipt animation sometimes has holes in it #9769
Comments
Usually this is the media repo being slow or unresponsive. Does reloading the page help? |
I just saw that happen with read receipts from people with no avatar. The issue is that the second read receipt from the right seems to be "hidden" behind the first as when I click the one on the right the second one "slides" from behind it and fix the display. |
I can say I've only ever seen that behaviour when the media repo has a problem (the image fails to load, and it doesn't fall back to letters, which causes weird merging and artifacts). Some other side effects are read receipts sticking to the wrong events, etc. Would recommend doing a hard refresh on the page, or opening the inspector, going to network, disabling cache, and refreshing. |
i've seen it even when the media repo is fine. there's been a long-term bug where sometimes the tetris algorithm races and fails, which brendan's screenshot shows (as delph & neilj collide) |
Fixes element-hq/element-web#11496 Fixes element-hq/element-web#11385 Fixes element-hq/element-web#10007 Fixes element-hq/element-web#9769 React does (kinda) bind `this._isUnmounting` for us in the context of the EventTile, but the EventTile then passes the function straight through to the ReadReceiptMarker component, which then binds it in the context of EventTile. This results in `this._mounted` being falsey all the time, preventing the ReadReceiptMarker from hitting the code where it updates rrInfo in its unmount. The velocity stuff is smart enough to realize that it has a read receipt and shuffles everything over by one, but when it goes to check the starting height (which will be null/undefined because the RRMarker didn't update it) it assumes it has never seen the receipt before and appends it again - this is what causes some holes/stacking. By forcefully binding the `this._isUnmounting` function we ensure that the `this._mounted` variable is correctly referenced in the context of the MessagePanel, allowing the RRMarker to update its position, and therefore allowing the velocity behaviour to be consistent.
This may also be #3976 |
This has regressed even further as of ~1 week ago. Previously you could "fix" it by sending events or causing the timeline to update, but now it's stuck as broken until you switch rooms. |
Started to notice that even in 1:1 rooms, the read receipt doesn't move until you click away from the room or the other person sends an event. It's almost as bad as not having them enabled at this point, and it really feels like read receipts being horribly inaccurate should be a 🔥 and not a P2. |
Looks like this was caused by moving BaseAvatar to hooks in matrix-org/matrix-react-sdk#4101 - it looks like the set if URLs & index are initially defined to be empty / undefined and then subsequently updated, which means BaseAvatar starts out rendering all avatars as the default no-avatar, then updates it to the real avatar immediately afterwards. This breaks Velocity because it starts out animating the We probably ought to:
2 & 3 are probably better done by killing off the velocity animations in favour of CSS animations. 1. seems like a thing we ought to do anyway because it must be causing quite a few unnecessary updates every time we re-mount a |
For part 1 of fixing this, I agree the control flow seems much harder to follow with hooks... 😖 In more detail, it's not clear to me what a "good" way to compute a complex initial state value before the first render happens, which seems like what we want here to ensure the URL lists are static and unchanging. In a class component, it would be easy to run these steps in the constructor, but I am not sure what the blessed way to do it is for hooks. |
Confirmed that above PR fixes the problem with read receipts not moving down, but this bug seems to represent all manner of symptoms so I'm not going to venture to say this issue is fixed. |
Returning this to the backlog for now, as matrix-org/matrix-react-sdk#5142 seems to address the most critical regression. Future work here would likely endeavour to switch to CSS animations. |
I'm still seeing some read receipts not moving down as they should (it's much more rare though), is this expected? |
Yes, that's the known state of the issue at the moment: it should be rare, but still possible. |
Agreed, I've been seeing it happen quite reliably for the past few weeks, so it's more frequent than rare atm |
matrix-org/matrix-react-sdk#5697 fixes this. If it doesn't, please open a new issue so we can track symptoms without having to go through a couple years of history. |
I've observed this using riot.im/develop on Firefox (on GNU/Linux), read receipts sometime display with a hole in the middle:
If I click on the one at the right to expand the list, it expands correctly, and collapse correctly (like it should have been displayed in the first place, without holes) if I click again.
The text was updated successfully, but these errors were encountered: