-
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 Netsuite - App crashes when tapping on export settings after disconnecting with another device #56021
base: main
Are you sure you want to change the base?
Conversation
@ahmedGaber93 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] |
Reviewer Checklist
Screenshots/VideosAndroid: Nativea.mp4Android: mWeb Chromeaw.mp4iOS: NativeI failed to build the iOS on my environment, but this fix not limited to iOS, so the above videos is enough iOS: mWeb Safariiw.mp4MacOS: Chrome / Safariw.mp4MacOS: Desktopd.mp4 |
@hoangzinh I think we need to fix those places also, because they can crash with the same root cause ( |
Because it's a util, so I guess it will be caught somewhere before 👀 |
@hoangzinh That is mostly correct, but I think it not 100% because it depends on where we use it in. |
@ahmedGaber93 sure. I updated in this commit fe7d499. But it's failing test of CalendarPickerTest. There is a report in Slack here https://expensify.slack.com/archives/C01GTK53T8Q/p1738397681223439 |
The failing test will fix here #56229 |
@hoangzinh test should work now, let's merge main. |
…-on-another-device
@ahmedGaber93 Done. All checklist are passed |
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!
@hoangzinh It looks we have git conflict here, please resolve it. Thanks! |
…-on-another-device
Done @ahmedGaber93 |
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.
nearly there! We need to update those policyID defaults to match the new style, but otherwise looking good.
import CONST from '@src/CONST'; | ||
import ROUTES from '@src/ROUTES'; | ||
|
||
function NetSuiteCollectionAccountSelectPage({policy}: WithPolicyConnectionsProps) { | ||
const styles = useThemeStyles(); | ||
const {translate} = useLocalize(); | ||
|
||
const policyID = policy?.id ?? '-1'; | ||
const policyID = policy?.id ?? `${CONST.DEFAULT_NUMBER_ID}`; |
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 believe we shouldn't default this value anymore - https://github.com/Expensify/App/blob/main/contributingGuides/STYLE.md#default-value-for-inexistent-ids - "To address both problems, string IDs should not have a default value."
src/pages/workspace/accounting/netsuite/advanced/NetSuiteApprovalAccountSelectPage.tsx
Outdated
Show resolved
Hide resolved
...ages/workspace/accounting/netsuite/advanced/NetSuiteExpenseReportApprovalLevelSelectPage.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/accounting/netsuite/advanced/NetSuiteVendorBillApprovalLevelSelectPage.tsx
Outdated
Show resolved
Hide resolved
@dangrous, can you help confirm if Lines 976 to 977 in a8daefb
Lines 1000 to 1001 in a8daefb
I would like to get confirmation to fix TS error here Lines 43 to 45 in a8daefb
|
checking! It looks like |
hey @hoangzinh I'm still not 100% sure but I think we can move forward with assuming |
Perfect. Thank you @dangrous |
Hey @dangrous @ahmedGaber93 I fixed type-check for "Default value for inexistent IDs" in this commit. Reg. Feel free to review this PR again. I tried to test as much as I can Screen.Recording.2025-02-07.at.16.05.31.mov |
Explanation of Change
Fixed Issues
$ #55723
PROPOSAL: #55723 (comment)
Tests
Same as QA
Offline tests
N/A this can't be test when network is offline
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Prerequisite
PR 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
Screen.Recording.2025-01-30.at.18.52.07.android.mov
Android: mWeb Chrome
Screen.Recording.2025-01-30.at.18.53.33.android.chrome.mov
iOS: Native
Screen.Recording.2025-01-30.at.17.28.02.ios.mov
iOS: mWeb Safari
Screen.Recording.2025-01-30.at.17.30.54.ios.safari.mov
MacOS: Chrome / Safari
Screen.Recording.2025-01-30.at.08.49.43.web.-.test1.mov
MacOS: Desktop
Screen.Recording.2025-01-30.at.08.54.01.desktop.mov