-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[PAY HUZAIFA][HOLD ON #15212] [$1000] The 'new messages' floating indicator doesnt go away after clicking it #21288
Comments
Triggered auto assignment to @jliexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
Weird one - I can repro on v1.3.30-5. |
Job added to Upwork: https://www.upwork.com/jobs/~01b010060f9e3fbd46 |
Current assignee @jliexpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is root cause of that problem?
What Changes do you think we should make in order to solve the problem?Affected File Code:
scrollToBottomAndMarkReportAsRead() {
ReportScrollManager.scrollToBottom();
Report.readNewestAction(this.props.report.reportID);
+ this.setState({newMarkerReportActionID: ''});
}
trackScroll({nativeEvent}) {
this.currentScrollOffset = -nativeEvent.contentOffset.y;
+ // If the user scrolls to the top of the list, we want to mark the report as read
+ if(nativeEvent.contentOffset.y === 0 ) {
+ this.scrollToBottomAndMarkReportAsRead();
+ }
this.toggleFloatingMessageCounter();
} Fixed: Fix--NEwMessages.mp4What alternative solutions did you explore? (Optional)
|
📣 @Thehamzaasif! 📣
|
@Thehamzaasif please use this template for your proposal. More info about contributing guide can be read here. |
Please re-state the problem that we are trying to solve in this issue. The problem we are trying to solve is that when the user presses the "New Messages" button or manually scrolls down to the latest message in the Expensify application, the message is not marked as read. This behavior is undesirable as it can lead to confusion and difficulty in tracking unread messages. What is the root cause of that problem? Changes: Instead of relying on the newMarkerReportActionID state, we can modify the code to directly mark the message as read when the user triggers the "New Messages" button or manually scrolls down to the latest message. Here's an alternative approach: In the scrollToBottomAndMarkReportAsRead function (ReportActionsView.js): Remove the line this.setState({ newMarkerReportActionID: '' }); as we won't be using the newMarkerReportActionID state. Remove the check for nativeEvent.contentOffset.y === 0 and the call to this.scrollToBottomAndMarkReportAsRead();. Locate the code that handles the "New Messages" button click event and add the following line after scrolling to the latest message: Report.readNewestAction(this.props.report.reportID); Update the code that handles manual scrolling to the latest message: Locate the code that handles the manual scrolling event to the latest message (e.g., in a scroll event listener). Report.readNewestAction(this.props.report.reportID); By making these alternative changes, the message will be marked as read directly when the user triggers the "New Messages" button or manually scrolls down to the latest message. This approach bypasses the need for the newMarkerReportActionID state and ensures that the message is correctly marked as read, addressing the problem effectively. |
ProposalPlease re-state the problem that we are trying to solve in this issue.The 'new messages' floating indicator doesn't go away after clicking it and the scroll reaches the bottom What is the root cause of that problem?We are not adding App/src/pages/home/report/ReportActionsView.js Lines 343 to 344 in e6c4b4e
Also when the scroll reaches the bottom, we are not removing the marker and reading the newest action. What changes do you think we should make in order to solve the problem?We can add App/src/pages/home/report/ReportActionsView.js Lines 343 to 344 in e6c4b4e
and modify the
according to this comment: App/src/pages/home/report/ReportActionsView.js Lines 113 to 118 in e6c4b4e
We will mark the report as read and remove the new message line when y scroll position is 0. What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.We want to mark the comment/report action as read whenever
which in turn removes the unread message marker and floating message bubble. What is the root cause of that problem?At the moment we are only marking the previous messages as read whenever a user sends a message by subscribing to action events here. What changes do you think we should make in order to solve the problem?I think we should use the existing logic that we have here to handle the floating bubble properly and unread marker correctly. We have to
if(this.currentScrollOffset === 0 && this.state.newMarkerReportActionID) {
Report.readNewestAction(this.props.report.reportID);
} After these changes I think we should also update the code comments in the new action subscriber block here What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.Once unread message is checked, the 'New Messages' indicator won't be disappeared. What is the root cause of that problem?The current code does not update the state - newMarkerReportActionID after unread message is checked. What changes do you think we should make in order to solve the problem?We can update this state - newMarkerReportActionID to check the message is checked or not.
If the user scrolls to the top of the list, we want to mark the report as read
What alternative solutions did you explore? (Optional) |
@fedirjh got a few proposals, could you take a look? Cheers! |
@jliexpensify We have a tracking issue for the unread indicator in #15212 , I think we should either hold it or add it to the issue tracker. |
Thanks for surfacing this one @fedirjh - I'll add this one to the master issue and add HOLD onto this label. I actually think I'm assigned another tracking indicator GH, and the consensus was to HOLD to see if the master issue resolved things. |
@jliexpensify, @fedirjh Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
On Hold |
Oh hold |
Still on hold |
On hold |
On hold |
On hold! |
This should be fixed! We can retest and close this.
|
I just retested, and this seems to be the current behavior. I think we can close then: CleanShot.2023-11-21.at.18.42.23.mp4 |
Awesome stuff! It looks like @huzaifa-99 needs to be paid as the bug reporter. I'll spin up a job and pay him $250 (under the old payment scheme). Thanks everyone! |
@huzaifa-99 Upworks is error-ing out on me. Can you please apply here? https://www.upwork.com/jobs/~0114cf334b1532eb43 Thanks! |
Applied @jliexpensify. Thank you! |
Offer sent, thanks @huzaifa-99 |
Accepted @jliexpensify. thanks |
All paid and job closed! |
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:
Expected Result:
The floating 'new messages' button should disappear after it is pressed and user is scrolled to bottom
Actual Result:
The floating 'new messages' button remains visible
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.30-5
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
Screen.Recording.2023-06-15.at.5.52.02.PM.mov
Recording.1056.mp4
Expensify/Expensify Issue URL:
Issue reported by: @huzaifa-99
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686833432496709
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: