fix: autolink on edit#9405
Conversation
luacmartins
left a comment
There was a problem hiding this comment.
@allroundexperts I'm a bit confused since this solution is quite different from what you originally proposed. Could you please clarify why that's the case?
@luacmartins How is it different? At the time of my proposal, the |
@luacmartins This is the commit that was missing in my original proposal. |
|
Ah I see. Thanks for clarifying! I'll probably be able to review this later this week. Meanwhile, @mananjadhav feel free to leave your comments. |
|
I'll be reviewing this by max tomorrow. Some system issues and I am just setting the workspace on another machine. |
mananjadhav
left a comment
There was a problem hiding this comment.
Change looks fine. I'll test this today/tomorrow and update here.
mananjadhav
left a comment
There was a problem hiding this comment.
One change requested (restructure the expression). Rest of it tests well. Once you are done @allroundexperts ping me I'll test once again.
mananjadhav
left a comment
There was a problem hiding this comment.
Thanks for the change @allroundexperts. LGTM.
@luacmartins 🎀 👀 🎀 C+ reviewed
@luacmartins Bump ^ |
| function editReportComment(reportID, originalReportAction, textForNewComment) { | ||
| const parser = new ExpensiMark(); | ||
| const htmlForNewComment = parser.replace(textForNewComment); | ||
| const htmlForNewComment = parser.replace(textForNewComment, {filterRules: _.filter(_.pluck(parser.rules, 'name'), name => name !== 'autolink')}); |
There was a problem hiding this comment.
@allroundexperts Let's add a comment explaining why we are removing autolink as it's not obvious for someone not familiar with this issue.
There was a problem hiding this comment.
Comment looks good, but linting is failing now
|
✋ 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.79-0 🚀
|
|
🚀 Deployed to production by @roryabraham in version: 1.1.79-17 🚀
|
|
Just for visibility, after merging this PR we found that editing a message to include a link made it so the link wasn't rendered. I'm not sure if that was considered in-scope for this PR, but mentioning it so in the future we always try to think about the flows for creating and updating messages when changing the code to render them |
Details
This PR removes the
autolinkparsing rule when a message is being edited.Fixed Issues
$ #9090
Tests
PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */displayNamepropertythisproperly 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)PR Reviewer Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesSTYLE.md) were followed/** comment above it */displayNamepropertythisproperly 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)QA Steps
Screenshots
Web
Screen.Recording.2022-06-12.at.2.06.28.AM.mov
Mobile Web
Simulator.Screen.Recording.-.iPhone.13.-.2022-06-12.at.02.08.54.mp4
Desktop
Screen.Recording.2022-06-12.at.2.11.29.AM.mov
iOS
Simulator.Screen.Recording.-.iPhone.13.-.2022-06-12.at.02.13.06.mp4
Android
Screen.Recording.2022-06-12.at.2.15.07.AM.mov