-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Deleted message] in LHN subtitle #28364
[Deleted message] in LHN subtitle #28364
Conversation
@rushatgabhane Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
This comment was marked as outdated.
This comment was marked as outdated.
Another thing to note is that lint code check is failing. The reason is that it is already broken in main as I see the same failure with or without our changes. Just wanted to mention this for reference. Also, not sure if we have to take any action for this. |
@rushatgabhane Gentle bump on review here |
alright, thanks! |
@rushatgabhane |
@rushatgabhane Gentle nudge on reviewing this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rojiphil also, are you getting an infinite loop on creating a new thread? I merged with latest Screen.Recording.2023-10-03.at.10.27.11.mov |
Sorry. Was away from my laptop and test setup. Will check and get back on this. |
@rushatgabhane I just merged the PR branch with latest main. Also, I tested a normal flow. It seems to be working fine for me. I do not get infinite loop or console errors. 19722-regular-test.mp4 |
@rushatgabhane 19722-del-msg-task.mp4 |
@rushatgabhane |
@rushatgabhane |
@rushatgabhane |
@rushatgabhane Or is this resolved in the latest main? |
Oh! I was really hoping that you could reproduce this because the screenshot here is still bothering me. Please hold your review for the time being. |
Even after giving a fresh look, I am still not able to reproduce this. So, either this is an extreme edge case or the latest main has fixed this. To me, it looks like the latter case. The only logical explanation for this to happen is if, somehow, the |
I wanted to discuss one more point. Currently, as seen in the attached video, LHN shows previous visible message for canceled task having visible child actions. However, since 19722-deleted-task-lhn.mp4 |
Curious to know which option makes sense for this comment here. |
Coming from your comment here and this comment here in this issue, curious to know your thoughts on what should get displayed in LHN subtitle for a chat report that has the canceled task report’s action as the last visible action (note: here, the canceled task still has visible comments). |
Yeah I agree, let's go with the [Deleted task] direction |
I am okay with option B or C. Personally i think B would move ahead faster but I'm okay with either 🙂 let us know what you prefer. It would not require any backend changes right? |
Thanks @thienlnam for helping us move ahead on this. |
@chiragsalian |
Awesome, thanks for staying on top of this @rojiphil 🙂 |
This PR, now, also includes a fix for [Deleted task] as discussed in previous comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/chiragsalian in version: 1.3.86-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.86-5 🚀
|
Nice catch. This problem occurs when the last visible action is a message that has been moderated as pending removal. @chiragsalian @rushatgabhane |
I think its best to make another GH issue, i.e., report it as a bug. We'll mark it external and receive proposals to review and implement the one that sounds like it would work the best. Off the top of my head i can't think of a good solution without playing around with it a bit. |
Also found out another case related to [Attachment]. Problem: Steps:
new-issue-del-task-att.mp4Root Cause: Changes:
|
For reference, the bug is reported in Slack here |
@rushatgabhane @chiragsalian
Details
This PR makes the following changes to the code:
A) Code changes in
shouldReportActionBeVisibleAsLastAction
function so that an action is not considered to be visible if the message text is empty and it is, also, not a deleted parent action with visible child actions. This will ensure thatgetLastVisibleAction
will also include deleted parent actions with visible child actions for display.B) Implemented a
getDeletedParentActionMessageForChatReport
utility function inReportUtils
to return [Deleted task] for canceled tasks and [Deleted message] for all other actions with deleted parent action.C) Implemented a
getLastVisibleMessage
utility function inReportUtils
to return appropriate deleted message usinggetDeletedParentActionMessageForChatReport
. The utility function ofgetLastVisibleMessage
inReportActionsUtils
was not directly used to avoid lint errors. The newly implemented utility function inReporUtils
also reuses thegetLastVisibleMessage
fromReportActionsUtils
to avoid duplicate code.D) Code changes in
getLastMessageTextForReport
so that appropriate deleted message usinggetDeletedParentActionMessageForChatReport
can be displayed in LHN.E) Finally, in
deleteReportComment
, we call the new utility function fromReportUtils
instead ofReportActionsUtils
Fixed Issues
$ #19722
PROPOSAL: #19722 (comment)
Tests
Test for [Deleted message]
Parent
in a Chat ReportReply in thread
for the messageParent
Parent
Parent
in thread.Expected Behaviour: Verify
[Deleted message]
as LHN subtitle for Chat Report.Test for [Deleted task]
Buy Grocery
) in a Chat ReportMilk 1L
) in the task reportExpected Behaviour: Verify
[Deleted task]
as LHN subtitle for Chat Report.Offline tests
Same as Steps for Tests Section.
QA Steps
Same as Steps for Tests Section.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
19722-web-safari-1.mp4
Mobile Web - Chrome
19722-mweb-chrome-1.mp4
Mobile Web - Safari
19722-mweb-safari-1.mp4
Desktop
19722-desktop-1.mp4
iOS
19722-ios-native-1.mp4
Android
19722-android-native-1.mp4
Offline
19722-offline-1.mp4