-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Rewrite WalletStatementModal to functional component #26064
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.
Added two minor comments, well done otherwise
|
||
/** | ||
* Handles in-app navigation for iframe links | ||
* | ||
* @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. |
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! |
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.com
iframe, aslocalhost
is 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/202308
but 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.com
that 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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