Skip to content

Try latency compensation on marking messages as read #685

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

Open
gnprice opened this issue May 16, 2024 · 0 comments
Open

Try latency compensation on marking messages as read #685

gnprice opened this issue May 16, 2024 · 0 comments
Labels
a-msglist The message-list screen, except what's label:a-content a-sync Event queue; retry; local echo; races
Milestone

Comments

@gnprice
Copy link
Member

gnprice commented May 16, 2024

As described in #81, when we implement marking messages as read when you scroll past them, we'll have the unread markers disappear optimistically without waiting for an ack from the server:

  • Unlike most everything else in the Zulip data model, apply "latency compensation" when marking messages as read on scroll, meaning eagerly apply the change to the local UI rather than wait for the server to acknowledge it with an event.
    • Specifically, eagerly fade out the unread-message markers in the message list.

This issue is for going further, to eagerly update the model itself.

  • The zulip-mobile RN app doesn't do this; the consequence is that it looks kind of glitchy as the "N unreads" banner at the top of the message list doesn't update or disappear in sync with the unread markers.
  • I'm not actually sure what the web app does.
  • The downside is that if we eagerly update the model, then it's no longer part of a coherent snapshot together with the rest of our model — we'd be giving up some of the consistency provided by the Zulip event system.

There are a couple of approaches we could take to that consistency question, but we should think through the consequences.

When doing this, we should also do the same with the "mark as read" button at the bottom of the message list. As part of that, we'll make its fade-out animation somewhat longer again. See #613.

@gnprice gnprice added the a-msglist The message-list screen, except what's label:a-content label May 16, 2024
@gnprice gnprice added this to the Launch milestone May 16, 2024
@gnprice gnprice added the a-sync Event queue; retry; local echo; races label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-msglist The message-list screen, except what's label:a-content a-sync Event queue; retry; local echo; races
Projects
Status: No status
Development

No branches or pull requests

1 participant