Created by @ richvdh:matrix.org.
This happens when you first open a room in Vector, and your read-receipt is a few pages earlier. We initialise the RM from your RR, but don't know when that was, so don't show the banner.
how does this differ from #1192?
how does this differ from #1192?
The most obvious difference is that this makes the banner not appear when it should, while #1192 makes it appear when it should not. They have very different causes.
Me and @dbkr had a discussion about this. The main points were:
The two scenarios from the clients perspective (with the user currently not reading the RoomView) are:
Interestingly, on the opposite side of the RoomView is the RoomStatusBar, which bases itself on numUnreadMessages, which is literally how many messages were received since we last scrolled up! It would be nice to have a similar metric in the opposite direction. Like "number of messages received since we last stopped paying attention to the client". But this does not solve for the actual use-case of opening the client fresh and reading missed messages.
One solution could be to paginate up to the RR, but this could involve thousands of messages (and I guess that's why some apps display the number of unread messages alongside that arrow so that you can decide whether you actually want to read _999+_ messages.
i think the most recent conclusion on this is this that we should change how RM is implemented entirely, by maintaining it in the server and so synchronising it between clients. Therefore the client would use the existing permalink logic if needed to jump back to the point that the RM actually refers to.
This is https://github.com/vector-im/riot-web/issues/1159.
@lukebarnard1 - implementing #1159 could be a worthwhile mission to fix this and all the other crapness to do with RMs...
The synchronized RMs are largely useless without this. However, surely this is simple to fix - if our RM points at an event ID that we don't recognise or is off the top of the screen, we show the "Jump to unread messages" prompt. Otherwise, we don't. What am I missing?
The diff for this is hilariously small:
- var showBar = (pos < 0);
+ var showBar = pos < 0 || pos === null;
SHIP IT! :D
wouldn't it be more consistent to show the bar whenever the read marker isn't on the screen?
pos != 0
?
!==, even
Woohoo, I just rebuilt develop locally and tested... this fix is a great improvement in usability! :tada:
the fix seems to have introduced another issue though
when joining a room, the banner comes up when it shouldn't, the link doesn't take you anywhere, just flashes the view
yeah, i just hit @t3chguy's issue too. also, doesn't this need a synapse which supports the new RM stuff in order to work correctly?
@ara4n actually it'll still work without the new RM endpoint, the position of it will still be based on the user's RR (which might refer to an event that hasn't been paginated)
@richvdh yes, actually. In practice however, when scrolling down, the RM is repeatedly bumped off the bottom of the screen and scrolled up into the view-port. We could include some sort of padding but I have a feeling that wouldn't solve things for tall events.
To help me understand current intended and future behaviours …
Can the _read receipt_ implementation allow the system to know that (for example):
(When I see RR, singular, I wonder whether the implementation is based upon a single point in time, rather than ranges of read messages.)
The current behaviour is that RRs tell you the most recent message a given user has read; RM tracks the oldest message that you have read. There is no support for tracking ranges of read messages. It'd be better to ask this sort of thing via Matrix rather than adding sidebars to a bug like this one though :)
(Thanks for steering/sorry for the sidebar.)
This has been fixed by https://github.com/matrix-org/matrix-react-sdk/commit/96e7479d8b038a21a94d33107c1617811dc38d48, matrix-org/matrix-react-sdk#845, matrix-org/matrix-react-sdk#846 and matrix-org/matrix-react-sdk#855
Most helpful comment
This has been fixed by https://github.com/matrix-org/matrix-react-sdk/commit/96e7479d8b038a21a94d33107c1617811dc38d48, matrix-org/matrix-react-sdk#845, matrix-org/matrix-react-sdk#846 and matrix-org/matrix-react-sdk#855