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

[Hold#15212][$500] Chat -The " new message" is not shown on top of the page after mark as unread an IOU #26760

Closed
1 of 6 tasks
lanitochka17 opened this issue Sep 5, 2023 · 22 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Sep 5, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Tap on a report with IOU conversation
  3. Long press the IOU conversation
  4. Tap Mark as Unread
  5. Scroll up the page to note " new message"
  6. Long press any text message
  7. Tap Mark as Unread
  8. Scroll up the page

Expected Result:

After marking as unread an IOU, if user mark as unread any text message and scrolls up, the " new message" must be shown on top of the page

Actual Result:

After marking as unread an IOU, if user mark as unread any text message and scrolls up, the " new message" is not shown on top of the page

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.63-0

Reproducible in staging?: Y

Reproducible in production?: Y

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Bug6188699_iou.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01bbc84cf35cbe2835
  • Upwork Job ID: 1699077904760467456
  • Last Price Increase: 2023-09-05
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

Triggered auto assignment to @slafortune (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@rmm-fl
Copy link
Contributor

rmm-fl commented Sep 5, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

After marking a post as unread, and then scrolling up the "new messages" floating text is show and marking another post as unread the "new messages" floating text is dimissed and scrolling up again doesn't bring it back.

What is the root cause of that problem?

<FloatingMessageCounter
isActive={isFloatingMessageCounterVisible && !!currentUnreadMarker.current}
onClick={scrollToBottomAndMarkReportAsRead}
/>

The condition for isActive depends on if there is a current marker and before the current marker changes, current marker is being reset to null for a second. Which results in isActive being false, and dismissing the "new messages" button.

What changes do you think we should make in order to solve the problem?

<FloatingMessageCounter
isActive={isFloatingMessageCounterVisible && !!currentUnreadMarker.current}
onClick={scrollToBottomAndMarkReportAsRead}
/>

Remove !!currentUnreadMarker.current from isActive as the scroll handlers already check for !!currentUnreadMarker.current here lazily while scrolling here:

const handleUnreadFloatingButton = () => {
if (scrollingVerticalOffset.current > VERTICAL_OFFSET_THRESHOLD && !isFloatingMessageCounterVisible && !!currentUnreadMarker.current) {
setIsFloatingMessageCounterVisible(true);
}
if (scrollingVerticalOffset.current < VERTICAL_OFFSET_THRESHOLD && isFloatingMessageCounterVisible) {
if (readActionSkipped.current) {
readActionSkipped.current = false;
Report.readNewestAction(report.reportID);
}
setIsFloatingMessageCounterVisible(false);
}
};

And it works - thanks to the preconditions already present, for example: isFloatingMessageCounterVisible is initialized false, so it doesn't result in "new messages" being show when report is opened.

Result

result.mp4

What alternative solutions did you explore? (Optional)

--

@slafortune
Copy link
Contributor

bug report looks good

@slafortune slafortune added the External Added to denote the issue can be worked on by a contributor label Sep 5, 2023
@melvin-bot melvin-bot bot changed the title Chat -The " new message" is not shown on top of the page after mark as unread an IOU [$500] Chat -The " new message" is not shown on top of the page after mark as unread an IOU Sep 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01bbc84cf35cbe2835

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

Current assignee @slafortune is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External)

@rmm-fl
Copy link
Contributor

rmm-fl commented Sep 6, 2023

Probably on hold for #15212

@slafortune slafortune changed the title [$500] Chat -The " new message" is not shown on top of the page after mark as unread an IOU [Hold#15212][$500] Chat -The " new message" is not shown on top of the page after mark as unread an IOU Sep 7, 2023
@melvin-bot melvin-bot bot added the Overdue label Sep 7, 2023
@slafortune
Copy link
Contributor

Thanks @rmm-fl

@melvin-bot melvin-bot bot removed the Overdue label Sep 7, 2023
@slafortune
Copy link
Contributor

assigning a new BZ member, I am out on sabbatical

@slafortune slafortune removed their assignment Sep 8, 2023
@slafortune slafortune added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Sep 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 8, 2023

Triggered auto assignment to @sonialiap (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@Expensify Expensify deleted a comment from melvin-bot bot Sep 8, 2023
@melvin-bot melvin-bot bot added the Overdue label Sep 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

@eVoloshchak, @sonialiap Whoops! This issue is 2 days overdue. Let's get this updated quick!

@sonialiap

This comment was marked as outdated.

@melvin-bot melvin-bot bot removed the Overdue label Sep 12, 2023
@melvin-bot melvin-bot bot added the Overdue label Sep 15, 2023
@sonialiap

This comment was marked as outdated.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 18, 2023
@sonialiap sonialiap added the Weekly KSv2 label Sep 20, 2023
@melvin-bot melvin-bot bot removed the Overdue label Sep 20, 2023
@sonialiap sonialiap removed the Daily KSv2 label Sep 20, 2023
@melvin-bot melvin-bot bot added the Overdue label Sep 28, 2023
@sonialiap

This comment was marked as outdated.

@melvin-bot melvin-bot bot removed the Overdue label Oct 2, 2023
@melvin-bot melvin-bot bot added the Overdue label Oct 10, 2023
@sonialiap

This comment was marked as outdated.

@melvin-bot melvin-bot bot removed the Overdue label Oct 10, 2023
@melvin-bot melvin-bot bot added the Overdue label Oct 19, 2023
@sonialiap

This comment was marked as outdated.

@melvin-bot melvin-bot bot removed the Overdue label Oct 23, 2023
@melvin-bot melvin-bot bot added the Overdue label Oct 31, 2023
@sonialiap
Copy link
Contributor

Still on hold for #15212

@melvin-bot melvin-bot bot removed the Overdue label Oct 31, 2023
@melvin-bot melvin-bot bot added the Overdue label Nov 9, 2023
@sonialiap
Copy link
Contributor

Still on hold for #15212

@melvin-bot melvin-bot bot removed the Overdue label Nov 9, 2023
@melvin-bot melvin-bot bot added the Overdue label Nov 20, 2023
@sonialiap
Copy link
Contributor

PR not live yet, will test after it's out #25935

@melvin-bot melvin-bot bot removed the Overdue label Nov 20, 2023
@MonilBhavsar
Copy link
Contributor

This issue should be fixed! We can retest and most probably close it

@melvin-bot melvin-bot bot added the Overdue label Nov 29, 2023
@sonialiap
Copy link
Contributor

I cannot reproduce, I think this is fixed, closing

@melvin-bot melvin-bot bot removed the Overdue label Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants