-
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
remove deleted comment message on new chats #6458
remove deleted comment message on new chats #6458
Conversation
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.
One minor comment
src/libs/actions/Report.js
Outdated
const lastMessageText = lastActionMessage | ||
.replace(/((<br[^>]*>)+)/gi, ' ') | ||
.replace(/(<([^>]+)>)/gi, '') || `[${translateLocal('common.deletedCommentMessage')}]`; | ||
let lastMessageText; |
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.
You could do this instead and save a couple of lines
let lastMessageText = null;
if (report.reportActionCount > 0) {
// We are removing any html tags from the message html since we cannot access the text version of any comments as
// the report only has the raw reportActionList and not the processed version returned by Report_GetHistory
// We convert the line-breaks in html to space ' ' before striping the tags
lastMessageText = lastActionMessage
.replace(/((<br[^>]*>)+)/gi, ' ')
.replace(/(<([^>]+)>)/gi, '') || `[${translateLocal('common.deletedCommentMessage')}]`;
}
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.
Great catch. I have pushed the suggested changes.
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.
Tested and works well 👍
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Looks like this issue addressed the deploy blocker - #6426. |
…ed-message-on-new-chat remove deleted comment message on new chats (cherry picked from commit 0aa9834)
🚀 Cherry-picked to staging by @chiragsalian in version: 1.1.16-8 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by @roryabraham in version: 1.1.16-10 🚀
|
🚀 Deployed to staging by @NikkiWines in version: 1.1.16-11 🚀
|
🚀 Deployed to production by @roryabraham in version: 1.1.17-7 🚀
|
Details
This PR addresses a bug caused by my previous PR #4133.
Fixed Issues
$ #3743
$ #3293
$ #6426
Tests / QA Steps
Tested On
I am unable to test on iOS at the moment as the app is constantly stuck on splash screen for me.
Screenshots
Web
6456-web.mp4
Mobile Web
Simulator.Screen.Recording.-.iPhone.12.-.2021-11-24.at.18.04.10.mp4
Desktop
Screen.Recording.2021-11-24.at.18.09.49.mov
iOS
Android
6468-android.mp4