[No QA] [Bulk workspace edits] Scaffold Copy Policy Settings RHP flow#89959
Conversation
Declares POLICY_COPY_SETTINGS, POLICY_COPY_SETTINGS_SELECT_FEATURES, POLICY_COPY_SETTINGS_CONFIRM routes plus the matching screen name constants and RIGHT_MODAL.POLICY_COPY_SETTINGS entry. First slice of scaffolding for the bulk workspace edits flow.
Defines the param list for the new RHP flow (ROOT, SELECT_FEATURES, CONFIRM) and registers it in RightModalNavigatorParamList.
Adds PolicyCopySettingsModalStackNavigator wired to three stub page components and registers it on RightModalNavigator under SCREENS.RIGHT_MODAL.POLICY_COPY_SETTINGS. Pages are intentionally empty and will be filled in by the follow-up issues.
Maps the three new routes to their screens in linkingConfig and adds them to WORKSPACES_LIST_TO_RHP so the RHP slides over the Workspaces list during in-app navigation, deep links, and refreshes.
Adds the new Onyx key copyPolicySettings and its type definition,
including currentStep ('loading' | 'complete' | undefined) which
drives the progress modal state in later issues.
Defines CopyPolicySettingsParams (sourcePolicyID, policyIDList, parts) and registers COPY_POLICY_SETTINGS and COPY_POLICY_SETTINGS_NOTIFY in WRITE_COMMANDS so the action layer can call them in later issues.
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
Switches from `import type * as OnyxCommon` to `import type {Errors}`
to satisfy the no-restricted-syntax rule that disallows namespace
imports from sibling modules.
|
@ShridharGoel 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: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🚧 @francoisl 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, and Web. Happy testing! 🧪🧪
|
|
✋ 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/francoisl in version: 9.3.69-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.69-18 🚀
|
Explanation of Change
Scaffolds the declarative plumbing for the new "Copy configuration" RHP flow that's part of the Bulk workspace edits project. No UI is wired up yet — every page component is an empty stub. Subsequent issues in the project will fill them in.
This PR introduces:
src/ROUTES.ts):POLICY_COPY_SETTINGS,POLICY_COPY_SETTINGS_SELECT_FEATURES,POLICY_COPY_SETTINGS_CONFIRM.src/SCREENS.ts):POLICY_COPY_SETTINGS.{ROOT, SELECT_FEATURES, CONFIRM}plusRIGHT_MODAL.POLICY_COPY_SETTINGS.src/libs/Navigation/types.ts):PolicyCopySettingsNavigatorParamList, registered inRightModalNavigatorParamList.src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx):PolicyCopySettingsModalStackNavigatorwired to three stub pages, registered inRightModalNavigator.tsx.src/libs/Navigation/linkingConfig/config.ts): entry forSCREENS.RIGHT_MODAL.POLICY_COPY_SETTINGS.src/libs/Navigation/linkingConfig/RELATIONS/WORKSPACES_LIST_TO_RHP.ts): new screens added so the RHP slides over the Workspaces list during in-app navigation, deep links, and refreshes.src/ONYXKEYS.ts,src/types/onyx/CopyPolicySettings.ts): newCOPY_POLICY_SETTINGSkey andCopyPolicySettingstype, includingcurrentStep: 'loading' | 'complete' | undefined.src/libs/API/parameters/CopyPolicySettingsParams.ts,src/libs/API/types.ts):CopyPolicySettingsParamsandCOPY_POLICY_SETTINGS/COPY_POLICY_SETTINGS_NOTIFYwrite commands.The shape mirrors the existing Duplicate Workspace flow (
WORKSPACE_DUPLICATE), with adjustments per the design doc sections "[App] New routes, screens, and navigator", "[App] Onyx state for the flow", and "[App] API Types".Fixed Issues
$ #88667
PROPOSAL: N/A
Tests
Since this PR is pure scaffolding (no user-facing UI), there is nothing to interact with manually. To verify the scaffolding is wired correctly:
/policy/<any-policyID>/copy-settings— the URL should resolve to an empty RHP (the stub page) without crashing.Offline tests
N/A — no runtime behavior is added in this PR. Offline behavior will be implemented and tested in the issues that follow.
QA Steps
This PR contains no user-facing changes and ships behind no UI entry point. The "Copy configuration" three-dot menu item that exposes this flow lands in a follow-up issue.
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))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
N/A
Android: mWeb Chrome
N/A
iOS: Native
N/A
iOS: mWeb Safari
N/A
MacOS: Chrome / Safari
N/A