Skip to content

Conversation

@polqf
Copy link
Contributor

@polqf polqf commented Sep 26, 2023

🔗 Issue Links

🎯 Goal

Fix issues around Mark as/Jump to unread for scenarios around truncation

📝 Summary

There were some issues found when trying with truncated messages.

🛠 Implementation

  • When checking if the last message was seen, we are now checking if it was seen or it is currently on screen
  • Truncation events now clear the state for current user's read
  • When discarding messages using the unread messages pill, we are resetting the state that determines if the channel was marked as unread in the current session

🎨 Showcase

Add relevant screenshots and/or videos/gifs to easily see what this PR changes, if applicable.

Before After
img img

🧪 Scenarios

** Truncation **

  • Create a channel
  • Add some messages with 2 users
  • While in the channel, truncate it
  • Receive new messages

Expected result:

  • The unread message pill should not be displayed (It can be displayed as there is an issue on the backend)

** Mark as read when scrolled to bottom **

  • Open a channel with quite some unread messages (We don't want the first one to be visible when opening)
  • Scroll to the first unread
  • Receive 2 messages
    • You should see in the scroll to bottom counter 2 new messages
  • Scroll to bottom
    • 2 previous messages should be seen as read from the other device
  • Receive new messages

Expected result:

  • When receiving new messages, they should instantly be marked as read

** Do not mark as read when scrolled to top **

  • Open a channel with quite some unread messages (We don't want the first one to be visible when opening)
  • Scroll to the first unread
  • Receive 2 messages
    • You should see in the scroll to bottom counter 2 new messages

Expected result:

  • The 2 messages should not be seen as read from the other device

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change follows zero ⚠️ policy (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (docusaurus, tutorial, CMS)

🎁 Meme

@polqf polqf force-pushed the bugfix/mark-unread-truncation branch from c7a5281 to f852b5d Compare September 26, 2023 14:01
@polqf polqf marked this pull request as ready for review September 26, 2023 14:01
@polqf polqf requested a review from a team as a code owner September 26, 2023 14:01
@polqf polqf merged commit 5609ed5 into develop Sep 26, 2023
@polqf polqf deleted the bugfix/mark-unread-truncation branch September 26, 2023 15:02
polqf added a commit that referenced this pull request Sep 26, 2023
* Reset read for truncated messages

* Allow automatic marking as read when discarding unread messages

* Make sure we can mark as read if the last message was seen or is currently on screen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants