Fix anchor renderer for links in report messages & clean up#10144
Fix anchor renderer for links in report messages & clean up#10144puneetlath merged 10 commits intoExpensify:mainfrom
Conversation
|
@puneetlath @parasharrajat Reviewed and I also tested this, it works fine. Good amount of refactor also a part of the changes. I had only one issue that I wasn't able to reproduce this issue on production. 🎀 👀 🎀
|
@mananjadhav mind clarifying what you mean by this? |
|
@parasharrajat merge conflicts. |
|
Resolved |
One the issues we're solving in the PR is that the URL doesn't show tooltip (atleast based on the video in the GH body issue), but I can see the tooltip for the URL in production without the change. |
|
@mananjadhav I mentioned in my tests and QA steps that the following URLs need to be tested. So if you do those, you will see that the URLs that are not underlined have no tooltips in prod.
|
|
Yeah @parasharrajat I checked all the URLs and a few more after your PR. Don't worry those worked fine. I was testing the same in Prod before your PR fix. I found the issue, I was trying |
puneetlath
left a comment
There was a problem hiding this comment.
Two very small comments about propType comments. Otherwise, this looks great to me.
| /** The URL of the attachment */ | ||
| source: PropTypes.string, | ||
|
|
||
| /** Filename in case of attachments, anchor text in case of URLs or emails. */ |
There was a problem hiding this comment.
If this is for attachments only, why would there be URLs or emails?
| /** Any children to display */ | ||
| children: PropTypes.node, | ||
|
|
||
| /** Filename in case of attachments, anchor text in case of URLs or emails. */ |
There was a problem hiding this comment.
This is for comments only, so I would think attachments don't apply.
|
PR updated. There are two issues that I have found during working on this PR which I will report on slack when this is merged. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
| } | ||
|
|
||
| render() { | ||
| const source = addEncryptedAuthTokenToURL(this.props.source); |
There was a problem hiding this comment.
We shouldn't add encyptToken for local file, it will cause error console.
More details: #54640
There was a problem hiding this comment.
@hungvu193 Seriously. This PR is 3 years old. At that time w me didn't have local file. Also, this PR only does refactoring.
Can you please find a proper PR which surfaced the issue?
There was a problem hiding this comment.
Yes, you're correct. My bad, just found the offending PR.


Details
Fixed Issues
$ #9739
Tests
Note: Clicking on the internal links does not open them internally on storyBook. This is known and not a bug.
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
The Contributor+ will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarhave been tested & I retested again)/** 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
Note: Clicking on the internal links does not open them internally on the storyBook server. This is known and not a bug.
Screenshots
Web
Mobile Web
Desktop
iOS
Android