-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Rewrite WalletStatementModal to functional component #26064
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
Rewrite WalletStatementModal to functional component #26064
Conversation
burczu
left a comment
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.
Added two minor comments, well done otherwise
| * @param {MessageEvent} e | ||
| */ | ||
| navigate(e) { | ||
| const navigate = (e) => { |
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.
I know it was e before, but I would recommend to use more meaningful names for variables/parameters, so here something like event will be better. WDYT?
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.
I'm also a fan of more meaningful variable names so I'll change it, thanks
| } | ||
| // We listen to a message sent from the iframe to the parent component when a link is clicked. | ||
| // This lets us handle navigation in the app, outside of the iframe. | ||
| window.onmessage = (e) => navigate(e); |
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.
same here
Reviewer Checklist
Screenshots/VideosWeb26064-web.mp4Mobile Web - Chrome26064-web-mobile-chrome.mp4Mobile Web - Safari26064-web-mobile-safari.mp4Desktop26064-desktop.mp4iOS26064-ios.mp4Android26064-android.mp4 |
|
@MaciejSWM Isn't it possible to test it on other platforms? You have only added screenshot for web. |
|
@burczu I uploaded all the videos. Most of them either show a blank screen, or throw the CSP security error (the browser based ones). I have no idea how to make it show anything than a blank screen. Also, it seems like this component is not used anywhere so I had to invoke that route from the FAB menu. |
burczu
left a comment
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.
Reviewed and tested - I think we are ok to go!
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #16216 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
srikarparsi
left a comment
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.
lgtm as 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/srikarparsi in version: 1.3.62-0 🚀
|
|
@MaciejSWM @burczu @srikarparsi |
|
I will check this off as its low priority, but @srikarparsi can you make sure this gets QAed and post here for posteriority that we did not break it. Thanks! |
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.62-4 🚀
|
|
@mvtglobally this is how you can invoke it: In |
Details
Fixed Issues
$ #16216
PROPOSAL: #16216 (comment)
Tests
www.expensify.comiframe, aslocalhostis not whitelisted in the CSP headers coming fromwww.expensify.com. I disabled CSP protection in my chrome by downloading https://chrome.google.com/webstore/detail/always-disable-content-se/ffelghdomoehpceihalcnbmnodohkibj/related but still, even though the iframe is now loading, it's loadinghttps://www.expensify.com/statement.php?period=202201&authToken=<HIDDEN>that loads no content at all (empty and ) - this might be because I am navigating to this URL by directly going to/statements/202308but I have no card added to my wallet? I have no card added since I don't know how to do it/getting errors when adding a test mastercard card.This is the header I'm getting from
www.expensify.comthat sets the allowed ancestors for iframe:Offline tests
You should see
You appear to be offline.This feature requires an active internet connection to be used.instead of the iframe when you are offline.QA Steps
In Staging, the iframe should load without any problems.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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-08-30.at.17.45.59.mov
Mobile Web - Chrome
Screen.Recording.2023-08-30.at.17.38.53.mov
Mobile Web - Safari
Screen.Recording.2023-08-30.at.17.37.11.mov
Desktop
Screen.Recording.2023-08-30.at.17.35.13.mov
iOS
Screen.Recording.2023-08-30.at.17.30.51.mov
Android
Screen.Recording.2023-08-30.at.17.51.23.mov