Remove default values from WorkspaceInitialPage#55475
Conversation
…-WorkspaceInitialPage
…-WorkspaceInitialPage
|
@paultsimura 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: NativeAndroid.webmAndroid: mWeb ChromeiOS: NativeSimulator.Screen.Recording.-.iPhone.15.Pro.-.2025-01-22.at.21.12.39.mp4iOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.15.Pro.-.2025-01-22.at.21.19.50.mp4MacOS: Chrome / SafariScreen.Recording.2025-01-22.at.20.38.56.movMacOS: DesktopScreen.Recording.2025-01-22.at.20.43.58.mov |
|
@paultsimura Ready to review again! |
neil-marcellini
left a comment
There was a problem hiding this comment.
Overall looks great. One small request
| import CONST from '@src/CONST'; | ||
| import type {ReimbursementAccountStep} from '@src/types/onyx/ReimbursementAccount'; | ||
|
|
||
| type ReimbursementAccountStepToOpen = ValueOf<typeof REIMBURSEMENT_ACCOUNT_ROUTE_NAMES> | ''; |
There was a problem hiding this comment.
NAB: Can this be "or undefined" instead of "or empty string"?
There was a problem hiding this comment.
I'm not sure if it's feasible as we specifically check of empty string in some places in ReimbursementAccountPage.tsx and we also can pass it to READ_COMMANDS.OPEN_REIMBURSEMENT_ACCOUNT_PAGE API in BankAccounts.openReimbursementAccountPage() function
…-WorkspaceInitialPage
|
✋ 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/neil-marcellini in version: 9.0.90-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.90-6 🚀
|
Explanation of Change
This PR reworks
WorkspaceInitialPage.tsxto remove this bypass (const policyID =${policy?.id ?? CONST.DEFAULT_NUMBER_ID};) made to avoid ESLint errors with default values, now refactored to the correct way.Fixed Issues
$ #55750
PROPOSAL:
Tests
Offline tests
Same as Tests, but you won't be able to upgrade the Workspace.
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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
Screen.Recording.2025-01-22.at.17.31.23-compressed.mov
Android: mWeb Chrome
Screen.Recording.2025-01-22.at.17.36.47-compressed.mov
iOS: Native
Screen.Recording.2025-01-22.at.17.49.50-compressed.mov
iOS: mWeb Safari
Screen.Recording.2025-01-22.at.17.52.07-compressed.mov
MacOS: Chrome / Safari
Screen.Recording.2025-01-22.at.17.55.39-compressed.mov
Screen.Recording.2025-01-22.at.17.58.08-compressed.mov
MacOS: Desktop
Screen.Recording.2025-01-22.at.18.02.27-compressed.mov