-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix statement modal being broken on staging environment #52799
Conversation
29ba3f2
to
38e5b08
Compare
@alitoshmatov Please 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] |
Requesting review from @thienlnam for Expensify engineer review since he has context on this |
/** | ||
* Given the environment get the corresponding oldDot URL | ||
*/ | ||
function getOldDotURLFromEnvironment(environment: Environment): string { | ||
return OLDDOT_ENVIRONMENT_URLS[environment]; | ||
} | ||
|
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.
We already have getOldDotEnvironmentURL so we don't need this right?
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.
Yeah but getOldDotEnvironmentURL
returns a Promise. We could make it work but I thought using this where we provide the environment variable lets us do it synchronously and prevents us from having to do an async call in the modal
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.
bump @thienlnam
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.
Sorry, forgot to get back to this - I guess that is true, it just feels odd having the same method twice and I imagine people might not know which one to use when they see this. But alternatively I guess you'd have to use a useEffect to get the baseURL so this is cleaner
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
✋ 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/thienlnam in version: 9.0.66-0 🚀
|
Looks like this fixed the original problem of the statement not downloading but the statement UI is still broken. Looks like a CSP error. Looking into it here:https://expensify.slack.com/archives/C03TQ48KC/p1732560231315739?thread_ts=1732044492.040319&cid=C03TQ48KC |
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.66-8 🚀
|
Explanation of Change
Our statement modal works on prod but not on staging because the URL its using to query OldDot is not cognizant that it is on staging. Here we implement logic to make it query staging when on staging and production when on production.
Fixed Issues
$ #52046
PROPOSAL:
Tests
Can't be tested locally since the bug is specific to the staging environment.
Offline tests
QA Steps
https://staging.new.expensify.com/statements/202406
where the last 6 digits in the url represent the year and month (yyyymm
) of the statement you are trying to access. If you have a enabled wallet that would probably be better for QA-ing this, if you don't ping @blimpich to do the QA insteadPR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop