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

Count is always shown as 1 new message when there are multiple unread messages in the new MarkerBadge #4669

Closed
parasharrajat opened this issue Aug 14, 2021 · 29 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@parasharrajat
Copy link
Member

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. Open any conversation in newDot.
  2. Scroll back in the history to see the new Markerbadge when new messages are received.
  3. Send a new message from another device to the correct chat from the other user.
  4. See that the new Marker badge is shown.
  5. Now don't yet interact with the app or marker yet.
  6. Send another message from the other device.
  7. Observe that count is still 1.

Expected Result:

The count should increase to see the correct number.

Actual Result:

The count is always one.

Workaround:

None.

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.0.85.-5
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

issue-marker.mp4

Expensify/Expensify Issue URL:

View all open jobs on Upwork

@parasharrajat parasharrajat added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Aug 14, 2021
@MelvinBot
Copy link

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

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Aug 14, 2021
@parasharrajat
Copy link
Member Author

Explanation:

  1. We should this.props.report.unreadActionCount in the Markerbadge.
  2. But every time a message is received the this.props.report.unreadActionCount reset code is executed
    updateLastReadActionID(this.props.reportID);

Proposal after Triage is done...

@mallenexpensify
Copy link
Contributor

Proposal after Triage is done...
👍 @parasharrajat

I'm not seeing this
image
I tried to message myself between desktop and web on two different accounts, with web being on staging.
@parasharrajat , any idea why I'm not seeing the notification?

@parasharrajat
Copy link
Member Author

Sorry @mallenexpensify, this is yet to be deployed to staging or PROD #4603

@mallenexpensify
Copy link
Contributor

Should we wait for it to hit one or both before attempting a fix/update?
Or.. put another way... If I'm unable to test, then it's hard for me to recommend we should make this update.

@parasharrajat
Copy link
Member Author

Yes. I am holding it till #4603. Created the issue so that it can be fixed quickly.

@parasharrajat
Copy link
Member Author

parasharrajat commented Aug 17, 2021

@mallenexpensify the PR just hit Staging and the issue is now active.

@mallenexpensify
Copy link
Contributor

Took a min (aka, I needed to read your steps, ha) but I was able to reproduce on web, staging.

At one point I did actually see the number rise to 3 but it most commonly was returning 1.

Gonna move along to an engineer to ensure this can be an external issue :)

@MelvinBot
Copy link

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

@mallenexpensify mallenexpensify removed their assignment Aug 18, 2021
@roryabraham roryabraham added the External Added to denote the issue can be worked on by a contributor label Aug 20, 2021
@MelvinBot
Copy link

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

@roryabraham
Copy link
Contributor

This should not have gotten the Overdue label right as I applied the External label. Thats not right

@MelvinBot MelvinBot removed the Overdue label Aug 20, 2021
@laurenreidexpensify laurenreidexpensify removed the External Added to denote the issue can be worked on by a contributor label Aug 20, 2021
@laurenreidexpensify laurenreidexpensify removed their assignment Aug 20, 2021
@laurenreidexpensify laurenreidexpensify added the External Added to denote the issue can be worked on by a contributor label Aug 20, 2021
@MelvinBot
Copy link

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

@laurenreidexpensify
Copy link
Contributor

@dylanexpensify I'm OOO next week and swamped with allocation reviews today so reassigning to get this added to Upwork thanks!

@MelvinBot MelvinBot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 20, 2021
@MTN718
Copy link
Contributor

MTN718 commented Aug 20, 2021

Proposal (Shane Watson from Upwork)

  1. In ReportActionView.js, updateLastReadActionID calling always. so it is reseting last unread message number
  2. So add code there, reset unread message when marker only not showing,in other word only reset scroll to end.
  3. And when scroll to end of bottom, reset unread number because currently unread update function when component update.
  4. Adding screenshot for code for make sense

image
image

  1. This is working video
Screen.Recording.2021-08-20.at.10.51.14.PM.mov

@parasharrajat
Copy link
Member Author

Explanation here #4669 (comment)

Proposal

  1. above functionality is necessary to mark the messages read but on the other hand, we want to show the marker to show the correct messages.
  2. To do the above, we can create a count in the state which we update on every new message after the marker is shown as this.state.isMarkerActive.
  3. We reset this count when the maker hides (When clicking close on it, users scroll down and the marker hides).
  4. We store the report unread count in this state variable this.props.report.unreadActionCount.

@roryabraham
Copy link
Contributor

@parasharrajat Your proposal looks good. @laurenreidexpensify Please hire @parasharrajat for this job on Upwork.

@MTN718
Copy link
Contributor

MTN718 commented Aug 20, 2021

I added solution also. and it works like video. I already tested on my local and uploaded video and proposal

@roryabraham
Copy link
Contributor

@MTN718 I think your solution that changes calls of updateLastReadActionID to happen in relation to this.state.isMarkerActive might have some unintended side-effects (it makes an API call that may affect other platforms). So that's why I prefer @parasharrajat's solution of keeping a local count in the component state.

@dylanexpensify
Copy link
Contributor

@roryabraham I'll send offer to @parasharrajat !

@MelvinBot MelvinBot removed the Overdue label Aug 23, 2021
@dylanexpensify
Copy link
Contributor

Offer sent!

@roryabraham roryabraham removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 26, 2021
@roryabraham roryabraham added Awaiting Payment Auto-added when associated PR is deployed to production Weekly KSv2 and removed Daily KSv2 labels Aug 26, 2021
@MelvinBot MelvinBot removed the Overdue label Aug 26, 2021
@roryabraham
Copy link
Contributor

PR was deployed to staging earlier today

@roryabraham
Copy link
Contributor

Oops, Awaiting Payment was premature, should be added when the PR is deployed to prod.

@alex-mechler
Copy link
Contributor

The current fix added a deploy blocker here: #4863

@roryabraham
Copy link
Contributor

This was deployed to production w/ regressions fixed in v1.0.88-2 – Should pay on Monday 9/6 (Labor Day) assuming no other regressions are found 🙂

@MelvinBot MelvinBot removed the Overdue label Sep 3, 2021
@parasharrajat
Copy link
Member Author

@dylanexpensify Any update for me on the Upwork job?

@parasharrajat
Copy link
Member Author

@dylanexpensify hmm. 🍷

@dylanexpensify
Copy link
Contributor

Hi @parasharrajat! Sorry for the delay! I was OOO - will work on this today! @roryabraham no further regressions, correct?

@dylanexpensify
Copy link
Contributor

@parasharrajat payment has been sent! Job closed out. Great work team!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants