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

Mark messages as read on scroll, configurably #81

Open
gnprice opened this issue Apr 21, 2023 · 3 comments
Open

Mark messages as read on scroll, configurably #81

gnprice opened this issue Apr 21, 2023 · 3 comments
Labels
a-msglist The message-list screen, except what's label:a-content beta feedback Things beta users have specifically asked for

Comments

@gnprice
Copy link
Member

gnprice commented Apr 21, 2023

This Zulip feature: https://zulip.com/help/marking-messages-as-read#configure-whether-messages-are-automatically-marked-as-read

That means:

  • When scrolling through messages that are unread, by default mark them as read with a request to the server.
  • Control that behavior with a local setting "Mark messages as read on scroll", with three values: https://zulip.com/help/marking-messages-as-read#configure-whether-messages-are-automatically-marked-as-read
  • 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.

That local setting should go in the app's database on the device, from #13.

This should come after:

@gnprice
Copy link
Member Author

gnprice commented Apr 21, 2023

Specifically, eagerly fade out the unread-message markers in the message list.

We might go further and 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. So, leaving that out of scope for this issue.

@gnprice gnprice added the m-beta label May 26, 2023
This was referenced May 26, 2023
@gnprice gnprice added this to the Beta milestone May 27, 2023
@gnprice gnprice added a-msglist The message-list screen, except what's label:a-content and removed m-beta labels May 27, 2023
@gnprice gnprice modified the milestones: Beta, Launch Sep 22, 2023
@gnprice gnprice modified the milestones: Launch, Beta 3 Dec 25, 2023
@gnprice gnprice modified the milestones: Beta 3: Summer 2024, Launch Sep 10, 2024
@chrisbobbe chrisbobbe added the beta feedback Things beta users have specifically asked for label Dec 12, 2024
@chrisbobbe
Copy link
Collaborator

chrisbobbe commented Dec 12, 2024

We've had a request for this as beta feedback: https://chat.zulip.org/#narrow/channel/48-mobile/topic/mobile.20beta.20feedback/near/2000430

Is there a way to turn on Mark messages as read on scroll in this beta? I'd gladly use beta app more often, but it bugs me out to tap Mark messages as read every time.

@chrisbobbe
Copy link
Collaborator

And some more requests:

here's another vote for prioritizing "Mark messages as read on scroll" support in the Flutter app.

[…] FWIW this is the main reason why I have not switched to the beta app. I'm subscribed to all channels here, and the fact that I have to continually mark messages as read manually makes the beta app very tedious for me to use -- I am manually marking hundreds if not thousands of messages as read every day.

PIG208 added a commit to PIG208/zulip-flutter that referenced this issue Mar 5, 2025
We could have extend `_removeAllInStreamTopic` to fit the needs of
handling moved unreads, but it is used in a code path where messages
are marked as read (which will become hotter after zulip#81).

These new helpers are designed to avoid making copies of message IDs
when possible.  As for names, we use "pop" (inspired by Python) to
indicate that the removed items are returned, since "removeAll" in
Dart doesn't carry that meaning.

Signed-off-by: Zixuan James Li <[email protected]>
PIG208 added a commit to PIG208/zulip-flutter that referenced this issue Mar 6, 2025
We could have extend `_removeAllInStreamTopic` to fit the needs of
handling moved unreads, but it is used in a code path where messages
are marked as read (which will become hotter after zulip#81).

The new helper is designed to avoid making copies of message IDs
when possible.  As for name, we use "pop" (inspired by Python) to
indicate that the removed items are returned, since "removeAll" in
Dart doesn't carry that meaning.

Signed-off-by: Zixuan James Li <[email protected]>
PIG208 added a commit to PIG208/zulip-flutter that referenced this issue Mar 6, 2025
We could have extend `_removeAllInStreamTopic` to fit the needs of
handling moved unreads, but it is used in a code path where messages
are marked as read (which will become hotter after zulip#81).

The new helper is designed to avoid making copies of message IDs
when possible.  As for name, we use "pop" (inspired by Python) to
indicate that the removed items are returned, since "removeAll" in
Dart doesn't carry that meaning.

Signed-off-by: Zixuan James Li <[email protected]>
PIG208 added a commit to PIG208/zulip-flutter that referenced this issue Mar 6, 2025
We could have extend `_removeAllInStreamTopic` to fit the needs of
handling moved unreads, but it is used in a code path where messages
are marked as read (which will become hotter after zulip#81).

The new helper is designed to avoid making copies of message IDs
when possible.  As for name, we use "pop" (inspired by Python) to
indicate that the removed items are returned, since "removeAll" in
Dart doesn't carry that meaning.

Signed-off-by: Zixuan James Li <[email protected]>
PIG208 added a commit to PIG208/zulip-flutter that referenced this issue Mar 7, 2025
We could have extend `_removeAllInStreamTopic` to fit the needs of
handling moved unreads, but it is used in a code path where messages
are marked as read (which will become hotter after zulip#81).

The new helper is designed to avoid making copies of message IDs
when possible.  As for name, we use "pop" (inspired by Python) to
indicate that the removed items are returned, since "removeAll" in
Dart doesn't carry that meaning.

Signed-off-by: Zixuan James Li <[email protected]>
PIG208 added a commit to PIG208/zulip-flutter that referenced this issue Mar 11, 2025
We could have extend `_removeAllInStreamTopic` to fit the needs of
handling moved unreads, but it is used in a code path where messages
are marked as read (which will become hotter after zulip#81).

The new helper is designed to avoid making copies of message IDs
when possible.  As for name, we use "pop" (inspired by Python) to
indicate that the removed items are returned, since "removeAll" in
Dart doesn't carry that meaning.

Signed-off-by: Zixuan James Li <[email protected]>
PIG208 added a commit to PIG208/zulip-flutter that referenced this issue Mar 12, 2025
We could have extend `_removeAllInStreamTopic` to fit the needs of
handling moved unreads, but it is used in a code path where messages
are marked as read (which will become hotter after zulip#81).

The new helper is designed to avoid making copies of message IDs
when possible.  As for the name, we use "pop" (inspired by Python)
to indicate that the removed items are returned, since "removeAll"
in Dart doesn't carry that meaning.

Signed-off-by: Zixuan James Li <[email protected]>
gnprice pushed a commit to PIG208/zulip-flutter that referenced this issue Mar 13, 2025
We could have extend `_removeAllInStreamTopic` to fit the needs of
handling moved unreads, but it is used in a code path where messages
are marked as read (which will become hotter after zulip#81).

The new helper is designed to avoid making copies of message IDs
when possible.  As for the name, we use "pop" (inspired by Python)
to indicate that the removed items are returned, since "removeAll"
in Dart doesn't carry that meaning.

Signed-off-by: Zixuan James Li <[email protected]>
PIG208 added a commit to PIG208/zulip-flutter that referenced this issue Mar 13, 2025
We could have extend `_removeAllInStreamTopic` to fit the needs of
handling moved unreads, but it is used in a code path where messages
are marked as read (which will become hotter after zulip#81).

The new helper is designed to avoid making copies of message IDs
when possible.  As for the name, we use "pop" (inspired by Python)
to indicate that the removed items are returned, since "removeAll"
in Dart doesn't carry that meaning.

Signed-off-by: Zixuan James Li <[email protected]>
PIG208 added a commit to PIG208/zulip-flutter that referenced this issue Mar 13, 2025
We could have extend `_removeAllInStreamTopic` to fit the needs of
handling moved unreads, but it is used in a code path where messages
are marked as read (which will become hotter after zulip#81).

The new helper is designed to avoid making copies of message IDs
when possible.  As for the name, we use "pop" (inspired by Python)
to indicate that the removed items are returned, since "removeAll"
in Dart doesn't carry that meaning.

Signed-off-by: Zixuan James Li <[email protected]>
PIG208 added a commit to PIG208/zulip-flutter that referenced this issue Mar 14, 2025
We could have extend `_removeAllInStreamTopic` to fit the needs of
handling moved unreads, but it is used in a code path where messages
are marked as read (which will become hotter after zulip#81).

The new helper is designed to avoid making copies of message IDs
when possible.  As for the name, we use "pop" (inspired by Python)
to indicate that the removed items are returned, since "removeAll"
in Dart doesn't carry that meaning.

Signed-off-by: Zixuan James Li <[email protected]>
PIG208 added a commit to PIG208/zulip-flutter that referenced this issue Mar 14, 2025
We could have extend `_removeAllInStreamTopic` to fit the needs of
handling moved unreads, but it is used in a code path where messages
are marked as read (which will become hotter after zulip#81).

The new helper is designed to avoid making copies of message IDs
when possible.  As for the name, we use "pop" (inspired by Python)
to indicate that the removed items are returned, since "removeAll"
in Dart doesn't carry that meaning.

Signed-off-by: Zixuan James Li <[email protected]>
gnprice pushed a commit to PIG208/zulip-flutter that referenced this issue Mar 15, 2025
We could have extend `_removeAllInStreamTopic` to fit the needs of
handling moved unreads, but it is used in a code path where messages
are marked as read (which will become hotter after zulip#81).

The new helper is designed to avoid making copies of message IDs
when possible.  As for the name, we use "pop" (inspired by Python)
to indicate that the removed items are returned, since "removeAll"
in Dart doesn't carry that meaning.

Signed-off-by: Zixuan James Li <[email protected]>
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 beta feedback Things beta users have specifically asked for
Projects
Status: No status
Development

No branches or pull requests

2 participants