[CP STG] Remove screenwrapper since addressPage already has a screenWrapper in it#78308
Conversation
|
@linhvovan29546 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] |
|
Running an adhoc build so that I can test on mobile |
| <AddressPage | ||
| isLoadingApp={false} | ||
| updateAddress={updatePolicyAddress} | ||
| title={translate('common.companyAddress')} |
There was a problem hiding this comment.
❌ PERF-4 (docs)
The updatePolicyAddress function is created inline without memoization, causing a new function reference on every render. This triggers unnecessary re-renders of the AddressPage component.
Wrap the function with useCallback:
const updatePolicyAddress = useCallback((values: FormOnyxValues<typeof ONYXKEYS.FORMS.HOME_ADDRESS_FORM>) => {
if (!policy) {
return;
}
if (!isUserValidated) {
const currentRoute = ROUTES.TRAVEL_WORKSPACE_ADDRESS.getRoute(route.params.domain, policyID, route.params.backTo);
setTravelProvisioningNextStep(currentRoute);
Navigation.navigate(ROUTES.TRAVEL_VERIFY_ACCOUNT.getRoute(route.params.domain, policyID));
return;
}
updateAddress(policy?.id, {
addressStreet: `${values.addressLine1?.trim() ?? }\n${values.addressLine2?.trim() ?? }`,
city: values.city.trim(),
state: values.state.trim(),
zipCode: values?.zipPostCode?.trim().toUpperCase() ?? ,
country: values.country,
});
Navigation.navigate(ROUTES.TRAVEL_TCS.getRoute(route.params.domain ?? CONST.TRAVEL.DEFAULT_DOMAIN, policyID), {forceReplace: true});
}, [policy, isUserValidated, route.params.domain, route.params.backTo, policyID]);|
🚧 @stitesExpensify has triggered a test Expensify/App build. You can view the workflow run here. |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
This comment has been minimized.
This comment has been minimized.
|
Tests well #78204 (comment) |
|
@situchan can you try these steps too please? I think we have another bug
|
|
Please push this fix App/src/pages/Travel/MyTripsPage.tsx Line 14 in f032b34 - const {policyID} = route.params;
+ const policyID = route.params?.policyID; |
|
Pushed. Starting another adhoc build |
|
🚧 @stitesExpensify has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
marcaaron
left a comment
There was a problem hiding this comment.
QA is reporting that this issue is fixed, but I think they tested the AdHoc build. Approving.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
This is another deploy blocker so we wanna test this as well before merge. |
|
Btw I confirmed fix crash with this change locally so all good! |
Remove screenwrapper since addressPage already has a screenWrapper in it (cherry picked from commit 44cc06e) (cherry-picked to staging by marcaaron)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by https://github.com/marcaaron in version: 9.2.85-7 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.2.85-7 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/marcaaron in version: 9.2.86-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.2.86-4 🚀
|

Explanation of Change
We were wrapping
AddressPagein ascreenWrapper, butAddressPagealready has ascreenWrapperinside of it. This caused double padding. To prevent that we can remove the outerscreenWrapperFixed Issues
$ #78204
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari