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

Convert isUnread logic to unreadActionCount. Improve LHN unread chat stability. #597

Merged
merged 11 commits into from
Oct 7, 2020

Conversation

marcaaron
Copy link
Contributor

@marcaaron marcaaron commented Oct 6, 2020

Migrating some changes over from #525 which went off the rails

Wanted to take a step back and focus on improving the stability of the unread indicators in the LHN before adding any UI that will display their specific counts. Will be attempting to fix one or two bugs in the process.

Fixed Issues

Fixes https://github.com/Expensify/Expensify/issues/142988
Possibly Related to https://github.com/Expensify/Expensify/issues/142727

Tests

Test that leaving comments on a report works as expected

  1. Leave a comment on a report
  2. Verify that it shows normally
  3. Leave another comment
  4. Verify it looks fine
  5. Refresh
  6. Verify the comments persist

Test that a chat will show in the LHN if a new comment has been left on it while RNC is not running at all

  1. Read all unread chats in the LHN
  2. Completely close your e.cash session
  3. Send several messages from another account
  4. Open your e.cash session again
  5. Verify the chat shows as unread

Test that a chat will show in the LHN if a new comment has been left on it and RNC is running

  1. Read all unread chats in the LHN
  2. Send one message from another account
  3. Verify the chat shows as unread
  4. Send another message from the same account as before
  5. Verify the chat shows as unread still
  6. Read the chat and click on another chat
  7. Verify the chat disappears from the list

Test that reconnection callbacks will reveal a chat in LHN on reconnect

  1. Read all unread chats in the LHN
  2. Comment out the Pusher.init() line in HomePage
  3. Go offline via the Network tab in Chrome Dev Tools
  4. Add several comments to a chat report as another user
  5. Go back online
  6. Verify the reconnection callbacks fire and the LHN updates with the chat

Screenshots

@marcaaron marcaaron self-assigned this Oct 6, 2020
@marcaaron marcaaron marked this pull request as ready for review October 6, 2020 04:45
@marcaaron
Copy link
Contributor Author

Ok this one is ready for another review.

tgolen
tgolen previously approved these changes Oct 6, 2020
Copy link
Contributor

@tgolen tgolen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! We're gonna have conflicts :D Let's see who gets their's merged first.

@tgolen tgolen merged commit dbb0998 into master Oct 7, 2020
@tgolen tgolen deleted the marcaaron-fixLHNUnread branch October 7, 2020 16:48
@MelvinBot MelvinBot mentioned this pull request Jan 29, 2024
50 tasks
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.

2 participants