[HOLD for payment 2021-10-14] Show New message indicator when user is scrolled up and after using the unread message badge
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
- Navigate to a conversation as User A
- Scroll up the conversation
- As user B (from another device) send some messages to user A
- Badge for unread messages should appear
- Click on the unread message badge
Expected Result:
There should be a new messages line indicator after using the unread message badge
Actual Result:
There's no indication on which messages are new.
Workaround:
No need, visual issue.
Platform:
Where is this issue occurring?
- Web
- iOS
- Android
- Desktop App
- Mobile Web
Version Number: 1.0.92-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/44479856/131887445-c56f5f24-42cd-4ca9-a909-363510cb4d8a.mp4
Expensify/Expensify Issue URL:
From @Santhosh-Sellavel
While the user is scrolling through old messages on new messages received,New messages badge will be shown. On tapping the badge will scroll to new messages at the bottom and should show the unread indicator NEWmarker above new messages. Currently, it's not shown.
Triggered auto assignment to @alex-mechler (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Looks like a good one to go external! Thanks for the video @Santhosh-Sellavel!
Triggered auto assignment to @mallenexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Proposal
Move the following lines to a new method updateUnreadIndicatorPosition & bind it in the constructor.
https://github.com/Expensify/App/blob/a919ee8008071fb1f3964417047fc82a59d4fc74/src/pages/home/report/ReportActionsView.js#L133-L140
The method will look like this with a param unreadActionCount slightly refactored to address this issue & existing workflow

Invoke method from the Line, because we moved it to a new function and it was intended to happen there https://github.com/Expensify/App/blob/a919ee8008071fb1f3964417047fc82a59d4fc74/src/pages/home/report/ReportActionsView.js#L133
Like this
this.updateUnreadIndicatorPosition(this.props.report.unreadActionCount)
Finally, to show NEW marker on scroll back, we should invoke the updateUnreadIndicatorPosition method from below block,
https://github.com/Expensify/App/blob/a919ee8008071fb1f3964417047fc82a59d4fc74/src/pages/home/report/ReportActionsView.js#L395-L401
Like this before updating the localUnreadActionCount
updateLocalUnreadActionCount(shouldResetLocalCount = false) {
this.setState((prevState) => {
const localUnreadActionCount = shouldResetLocalCount
? this.props.report.unreadActionCount
: prevState.localUnreadActionCount + this.props.report.unreadActionCount;
this.updateUnreadIndicatorPosition(localUnreadActionCount);
return {
localUnreadActionCount,
};
});
}
This would solve the issue, thanks!
Triggered auto assignment to @puneetlath (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Upwork job posted https://www.upwork.com/jobs/~0118968e3cb1d7b3c5 @puneetlath can you review @Santhosh-Sellavel 's proposal above?
@Santhosh-Sellavel it might not be til Tuesday til this happens because of the weekend and Monday is a holiday.
Whomever ends up working on this, I've seen this issue addressed a few times, in a few different ways and/or on different platforms. If possible, it'd be great to try to fix it, so that the unread indicator shows consistently, across platforms, when it should. I'm wanting to avoid us investing resources to fix multiple, similar versions of the problem.
@puneetlath should be able to get to this tomorrow or Wed
Sorry, just to clarify, how is this issue different than https://github.com/Expensify/App/issues/4723?
Sorry, just to clarify, how is this issue different than https://github.com/Expensify/App/issues/4723?
@puneetlath it same there is some PR/issue mixup in #4723. Triage was not done properly so raised as a new one!
Ok got it! So if I'm understanding correctly, this issue is a duplicate and should be closed. Please reopen if I've misunderstood.
@puneetlath Reopen this issue, it is not solved yet. It was decided to re-triage refer comment here https://github.com/Expensify/App/issues/4723#issuecomment-910568444
@mallenexpensify Could you help me a bit here, thanks!
@mallenexpensify or @puneetlath this is not solved yet reopen.
We're in a bit of a loop here, @Santhosh-Sellavel can you confirm
- https://github.com/Expensify/App/issues/4723 is 'a mess' with all the auto posting and closing and that that issue never got fully, properly fixed and closed?
- This 'clean' issue will replace #4723, you'll submit a PR for this when we should be all good and #4723 can stay closed?
#4723 never got an Upwork job created so I can create one for here once we get ducks in a row...
We're in a bit of a loop here, @Santhosh-Sellavel can you confirm
- https://github.com/Expensify/App/issues/4723 is 'a mess' with all the auto posting and closing and that that issue never got fully, properly fixed and closed?
Yes, it's a complete mess. It's not fixed yet.
- This 'clean' issue will replace #4723, you'll submit a PR for this when we should be all good and #4723 can stay closed?
Yes this issue is a replacement for #4723.
#4723 never got an Upwork job created so I can create one for here once we get ducks in a row...
Yes, no upwork job was created.
cc: @mallenexpensify @puneetlath Are we good here to review the proposal?
@puneetlath from what I can tell, we should proceed with this, can you review please and let me know if you recommend hiring @Santhosh-Sellavel ?
@puneetlath can you review when you have time please?
Sorry for the delay. Let's go ahead and hire @Santhosh-Sellavel and go forward with his proposal. Thanks!
@Santhosh-Sellavel , can you apply at https://www.upwork.com/jobs/~0118968e3cb1d7b3c5 then add a comment here so I can hire you? Thanks