Repository navigation
Remove "Comment Deleted" message - #7711
Conversation
MonilBhavsar
left a comment
There was a problem hiding this comment.
Looks good!
Would like to have eyes from someone more familiar
@marcaaron will you please review this since you were involved in issue discussion
marcaaron
left a comment
There was a problem hiding this comment.
Nice job! I have a couple of questions. Mostly around where we are updating the reportAction and whether we are updating the report object twice.
|
|
||
| // If the message is deleted, update the last read in case the deleted message is being counted in the unreadActionCount | ||
| // If the message is deleted, we should | ||
| // 1. update the last read in case the deleted message is being counted in the unreadActionCount |
There was a problem hiding this comment.
Capitalize Update?
Also, I don't entirely understand this comment "in case the deleted message is being counted". Can we tell if the deleted message is counted in the unreadActionCount or not? This comment reads like "maybe we need to do this".
There was a problem hiding this comment.
It seems that we are not counting deleted messages in unreadActionCount since we subtract it from the total count here. I'm not sure why we had that comment. I'll do some more digging.
There was a problem hiding this comment.
It seems that we are not counting deleted messages in unreadActionCount, but we want to update the last read and the counter anyways. I updated the comment to make it clear.
| if (sequenceNumber === reportMaxSequenceNumbers[reportID]) { | ||
| Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, { | ||
| lastMessageText: ReportUtils.formatReportLastMessageText(message.text) || `[${Localize.translateLocal('common.deletedCommentMessage')}]`, | ||
| lastMessageText: ReportActions.getLastMessageText(reportID), |
There was a problem hiding this comment.
I'm having trouble thinking of a better naming suggestion, but feels maybe not very obvious that ReportActions .getLastMessageText() would filter out deleted messages.
There was a problem hiding this comment.
Yea, I struggled with that too. Maybe getLastVisibleMessageText or getLastRemainingMessageText?
There was a problem hiding this comment.
I like getLastVisibleMessageText() there might be others we hide for reasons besides "deleting" in the future.
| // If this is the most recent message and it wasn't deleted, update the lastMessageText in the report object as well | ||
| const lastMessageText = ReportUtils.formatReportLastMessageText(message.text); | ||
| if (lastMessageText && sequenceNumber === reportMaxSequenceNumbers[reportID]) { | ||
| Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, {lastMessageText}); |
There was a problem hiding this comment.
I'm confused about why we are doing this step here. It looks like we would:
- call this once
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, {lastMessageText})- the promise above resolves and then we set the
lastMessageTextagain on line 559
Is that intentional?
There was a problem hiding this comment.
My memory is failing me and now I'm confused too 😅 I'll do some more testing and try to figure out why I thought this was necessary.
There was a problem hiding this comment.
Ah, I added the call inside then to update deleted messages and kept it outside to update edited messages. I think we can simplify this and just call it when the promise resolves.
|
Updated! |
marcaaron
left a comment
There was a problem hiding this comment.
Nice, thanks for the changes!
|
Approving, but should this be on HOLD until the Auth change? |
|
Hold removed! Self-merging with approval! |
|
✋ 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 @luacmartins in version: 1.1.41-0 🚀
|
|
🚀 Deployed to staging by @luacmartins in version: 1.1.41-0 🚀
|
|
🚀 Deployed to production by @francoisl in version: 1.1.41-6 🚀
|
|
Issue 1 - Title- [High] Keyboard : Controls(Edit, Delete, etc.) are not appearing using keyboard. 7711_.Controls.Edit.Delete.etc.are.not.appearing.using.keyboard.mp4Issue 2 - Title- [High] Keyboard : Role is not defined for 'Delete' & 'Cancel' control. 7711_Role.is.not.defined.for.Delete.Cancel.control.mp4Issue 3 - Title- [High] Keyboard : Role is not defined for 'Delete comment' control. 7711_Role.is.not.defined.for.Delete.Cancel.control.mp4 |
Details
Simply deletes a comment instead of showing
[Comment deleted]Fixed Issues
$ #7646
Tests
./script/makeAll.shNote: if the LHN message does not update, you might have to
make cleanand run./script/makeAll.shagain.QA Steps
Steps 2-4 above.
Tested On
Screenshots
Web
web.mov
Mobile Web
mweb.mov
Desktop
desktop.mov
iOS
ios.mov
Android
android.mov