App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2021-10-14] Show New message indicator when user is scrolled up and after using the unread message badge

Open isagoico opened this issue 5 years ago • 31 comments

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:

  1. Navigate to a conversation as User A
  2. Scroll up the conversation
  3. As user B (from another device) send some messages to user A
  4. Badge for unread messages should appear
  5. 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:

View all open jobs on GitHub


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.

isagoico avatar Sep 02 '21 17:09 isagoico

Triggered auto assignment to @alex-mechler (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Sep 02 '21 17:09 MelvinBot

Looks like a good one to go external! Thanks for the video @Santhosh-Sellavel!

alex-mechler avatar Sep 02 '21 18:09 alex-mechler

Triggered auto assignment to @mallenexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Sep 02 '21 18:09 MelvinBot

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 image

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!

Santhosh-Sellavel avatar Sep 02 '21 18:09 Santhosh-Sellavel

Triggered auto assignment to @puneetlath (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

MelvinBot avatar Sep 03 '21 21:09 MelvinBot

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.

mallenexpensify avatar Sep 03 '21 21:09 mallenexpensify

@puneetlath should be able to get to this tomorrow or Wed

mallenexpensify avatar Sep 06 '21 21:09 mallenexpensify

Sorry, just to clarify, how is this issue different than https://github.com/Expensify/App/issues/4723?

puneetlath avatar Sep 07 '21 23:09 puneetlath

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!

Santhosh-Sellavel avatar Sep 08 '21 01:09 Santhosh-Sellavel

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 avatar Sep 08 '21 22:09 puneetlath

@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

Santhosh-Sellavel avatar Sep 08 '21 22:09 Santhosh-Sellavel

@mallenexpensify Could you help me a bit here, thanks!

Santhosh-Sellavel avatar Sep 08 '21 22:09 Santhosh-Sellavel

@mallenexpensify or @puneetlath this is not solved yet reopen.

Santhosh-Sellavel avatar Sep 09 '21 16:09 Santhosh-Sellavel

We're in a bit of a loop here, @Santhosh-Sellavel can you confirm

  1. 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?
  2. 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...

mallenexpensify avatar Sep 09 '21 17:09 mallenexpensify

We're in a bit of a loop here, @Santhosh-Sellavel can you confirm

  1. 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.

  1. 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.

Santhosh-Sellavel avatar Sep 10 '21 00:09 Santhosh-Sellavel

cc: @mallenexpensify @puneetlath Are we good here to review the proposal?

Santhosh-Sellavel avatar Sep 13 '21 21:09 Santhosh-Sellavel

@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 ?

mallenexpensify avatar Sep 13 '21 23:09 mallenexpensify

@puneetlath can you review when you have time please?

mallenexpensify avatar Sep 16 '21 19:09 mallenexpensify

Sorry for the delay. Let's go ahead and hire @Santhosh-Sellavel and go forward with his proposal. Thanks!

puneetlath avatar Sep 17 '21 15:09 puneetlath

@Santhosh-Sellavel , can you apply at https://www.upwork.com/jobs/~0118968e3cb1d7b3c5 then add a comment here so I can hire you? Thanks

mallenexpensify avatar Sep 18 '21 00:09 mallenexpensify