Context
This is a sub-issue of #53493 (Replace modal screens with modals from @react-navigation).
For full background and migration approach, see the triage analysis comment, the sub-issue breakdown comment, and the updated status comment.
Problem
HRSyncResultsModal uses react-native-modal internally (via @components/Modal) with RIGHT_DOCKED animation. It is shown imperatively via useModal().showModal() when an HR sync completes, which causes animation inconsistencies compared to standard @react-navigation screens on native.
Migration approach (Group 1/2 — Navigate instead of imperative modal)
- File:
src/components/HRSyncResultsModal.tsx
- Hook:
src/hooks/useHRSyncResultsModal.ts
- Used by:
WorkspaceHRPage.tsx, WorkspaceMembersPage.tsx
- Current behavior: Imperative
useModal().showModal() when HR sync transitions to JOB_DONE with a result payload; defers via TransitionTracker.runAfterTransitions and waits if another modal is active
- Modal type:
RIGHT_DOCKED
- Data source:
PolicyConnectionSyncProgress.result is already on Onyx — route params only need policyID + connectionName. Do not pass HrSyncResult through route params.
Steps
- Add route/screen (e.g.
WORKSPACE_HR_SYNC_RESULTS) under the workspace HR navigator.
- Page receives
policyID + connectionName via route params; reads connectionSyncProgress.result and provider display name from Onyx.
- Replace
modal.showModal({ component: HRSyncResultsModal }) with Navigation.navigate(...).
- Preserve existing deferral logic (
TransitionTracker, isAnyModalActive guard, pendingSyncResultRef).
- Delete
HRSyncResultsModal.tsx and remove ModalContext dependency from the hook.
- QA: trigger HR sync completion on both Workspace HR and Members pages; verify no double-open, correct counts/skipped employees, and back navigation.
Reference
Issue Owner
Current Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit
Context
This is a sub-issue of #53493 (Replace modal screens with modals from
@react-navigation).For full background and migration approach, see the triage analysis comment, the sub-issue breakdown comment, and the updated status comment.
Problem
HRSyncResultsModalusesreact-native-modalinternally (via@components/Modal) withRIGHT_DOCKEDanimation. It is shown imperatively viauseModal().showModal()when an HR sync completes, which causes animation inconsistencies compared to standard@react-navigationscreens on native.Migration approach (Group 1/2 — Navigate instead of imperative modal)
src/components/HRSyncResultsModal.tsxsrc/hooks/useHRSyncResultsModal.tsWorkspaceHRPage.tsx,WorkspaceMembersPage.tsxuseModal().showModal()when HR sync transitions toJOB_DONEwith aresultpayload; defers viaTransitionTracker.runAfterTransitionsand waits if another modal is activeRIGHT_DOCKEDPolicyConnectionSyncProgress.resultis already on Onyx — route params only needpolicyID+connectionName. Do not passHrSyncResultthrough route params.Steps
WORKSPACE_HR_SYNC_RESULTS) under the workspace HR navigator.policyID+connectionNamevia route params; readsconnectionSyncProgress.resultand provider display name from Onyx.modal.showModal({ component: HRSyncResultsModal })withNavigation.navigate(...).TransitionTracker,isAnyModalActiveguard,pendingSyncResultRef).HRSyncResultsModal.tsxand removeModalContextdependency from the hook.Reference
@react-navigation#53493Issue Owner
Current Issue Owner: @mallenexpensifyUpwork Automation - Do Not Edit