EnterSignerInfo flow refactor#96321
Conversation
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.
|
|
@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] |
| }, [isEditing, moveTo, pageIndex, prevPage]); | ||
|
|
||
| if (isRedirecting) { | ||
| return <FullScreenLoadingIndicator reasonAttributes={{context: 'EnterSignerInfo', isRedirecting}} />; |
There was a problem hiding this comment.
❌ UI-1 (docs)
This FullScreenLoadingIndicator is rendered as an early return with no navigation component (no HeaderWithBackButton or close button) in that branch, and it omits shouldUseGoBackButton. If the redirect/loading hangs, the user is trapped with no escape route. Since no navigation is visible alongside the loader, shouldUseGoBackButton must be set explicitly so the emergency "Go Back" button appears after the timeout.
if (isRedirecting) {
return <FullScreenLoadingIndicator shouldUseGoBackButton reasonAttributes={{context: 'EnterSignerInfo', isRedirecting}} />;
}Reviewed at: 30272a8 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
There was a problem hiding this comment.
added that 👍 in practice isRedirecting resolves in a single render, so a true hang is unlikely. But it will be extra insurance
|
@dukenv0307 yes, exactly. It is the parent ticket #90979 |
|
okay I'll review it |
|
No product review needed. |
Explanation of Change
Part 2 of the
useSubStep→useSubPagemigration (see part 1 → #95946).This PR migrates the EnterSignerInfo flow (
src/pages/ReimbursementAccount/EnterSignerInfo/) to be URL-driven:useSubSteptouseSubPage. Each sub-step (Name, Job title, Date of birth, Address, Upload documents, Confirmation) is now backed by its own URL segment, so steps are deep-linkable and back navigation works off the route rather than in-memory state. NewSUB_PAGE_NAMESconstants are added underCONST.ENTER_SIGNER_INFO.BANK_ACCOUNT_ENTER_SIGNER_INFOnow supports:subPage?/:action?path params (alongside the existingpolicyID/bankAccountID/isCompletedquery params); navigation types are updated accordingly. The two existing call sites are unchanged (the new params are optional).useEnterSignerInfoStepFormSubmitand the six sub-step components switch fromSubStepPropstoSubPageProps.No user-facing behavior changes are intended - this is an architecture/refactor PR.
Fixed Issues
$ #90979
PROPOSAL:
Tests
The flow opens from Home → Time-sensitive → "Enter signer info" → Begin or the "…is connecting your bank account…" system message in a workspace expense chat.
.../bank-account/enter-signer-info/name)..../<sub-page>/edit), confirm the edit, and verify you're returned directly to Confirmation.Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
SignerInfo.mp4
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari