fix newlines are removed when copying chat message#16733
Conversation
|
@NikkiWines @eVoloshchak One of you needs to 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] |
|
Sorry, it takes long. I have a problem with my device and it's totally unusable right now. I will complete the video after the problem is resolved. |
|
Completed the video and checklist. |
|
Reviewing in a couple of hours |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-03-31.at.17.53.17.movMobile Web - ChromeScreen_Recording_20230331-180203_Chrome.mp4Mobile Web - SafariScreen.Recording.2023-03-31.at.17.58.18.movDesktopScreen.Recording.2023-03-31.at.17.56.23.moviOSScreen.Recording.2023-03-31.at.17.59.15.movAndroidScreen_Recording_20230331-180112_New.Expensify.mp4 |
| domRepresentation.children = _.map(domRepresentation.children, replaceNodes); | ||
|
|
||
| const newHtml = render(domRepresentation); | ||
| // Newline characters need to be removed here because the HTML could contains both newlines and <br> tags, and when |
There was a problem hiding this comment.
| // Newline characters need to be removed here because the HTML could contains both newlines and <br> tags, and when | |
| // Newline characters need to be removed here because the HTML could contain both newlines and <br> tags, and when |
|
There is a small typo above, other that that looks good and test well |
|
Fixed! |
eVoloshchak
left a comment
There was a problem hiding this comment.
LGTM
cc: @NikkiWines
NikkiWines
left a comment
There was a problem hiding this comment.
Looks good and tests 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. |
|
🚀 Deployed to staging by https://github.com/NikkiWines in version: 1.2.94-0 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.94-3 🚀
|
Details
Some newlines are removed when we copy a chat message to a text editor.
Fixed Issues
$ #16473
PROPOSAL: #16473 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Copy the message you just sent
a. Web/Desktop (test for both case):
i. select the text and press ctrl/cmd+c
ii. right click the message and click "Copy to clipboard"
b. Android/iOS/mWeb: Long press the message and press "Copy to clipboard"
Paste the text to any text editor
Verify the number of lines is the same (does not change)
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Screen.Recording.2023-03-31.at.01.08.50.1.mov
Mobile Web - Chrome
WhatsApp.Video.2023-03-29.at.23.57.42.mp4
Mobile Web - Safari
Screen.Recording.2023-03-31.at.01.16.13.mov
Desktop
Screen.Recording.2023-03-31.at.01.06.34.1.mov
iOS
Screen.Recording.2023-03-31.at.01.21.58.mov
Android
WhatsApp.Video.2023-03-30.at.01.20.55.mp4