Repository navigation
Refactor WorkspaceWorkflowsApprovalsEditPage loader to ActivityIndicator - #96826
Conversation
Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
|
The only failing check is From the check log:
Every actual code check is green: This one is a manual, human-only step — I can't check those boxes on your behalf since each item asserts testing/verification a person actually performed. To clear it, |
|
@MelvinBot add Tests/QA steps |
|
Added Tests, Offline tests, and QA Steps to the PR description. Since this PR only changes the loader on the Edit approvals page (
Throttling the network makes the brief loading state easier to observe. Please review and adjust the wording as needed before marking the PR ready. |
|
The only failing check is It's failing because the checklist in the PR description is unchecked:
To resolve: edit the PR description and tick each box in the author checklist (or copy the latest template from PULL_REQUEST_TEMPLATE.md if the checklist is out of date). This has to be done by a person, since checking the boxes is the confirmation that each item was actually considered. Every other check (tests, typecheck, ESLint, Oxfmt, build, etc.) is passing. |
| )} | ||
| {!initialApprovalWorkflow && <FullScreenLoadingIndicator reasonAttributes={{context: 'WorkspaceWorkflowsApprovalsEditPage'}} />} | ||
| {!initialApprovalWorkflow && ( | ||
| <View style={[styles.flex1, styles.justifyContentCenter, styles.alignItemsCenter]}> |
There was a problem hiding this comment.
@MelvinBot remove styles.justifyContentCenter, styles.alignItemsCenter and instead use styles.fullScreenLoading
There was a problem hiding this comment.
Done — replaced styles.justifyContentCenter, styles.alignItemsCenter with styles.fullScreenLoading. Pushed in e1533b6.
Co-authored-by: {"message":"Not Found","documentation_url":"https://docs.github.com/rest/issues/comments#get-an-issue-comment","status":"404"} <{"message":"Not Found","documentation_url":"https://docs.github.com/rest/issues/comments#get-an-issue-comment","status":"404"}@users.noreply.github.com>
|
The only failing checks are PR Author Checklist and PR Reviewer Checklist — every other check (tests, ESLint, Oxfmt, typecheck, builds, perf, Storybook, etc.) is passing. These two checks aren't a code problem: they fail because the checklist items in the PR description (author) and the reviewer's checklist haven't been ticked off yet. They'll go green once the checklist boxes are completed by the author and reviewer — there's nothing in the code for me to fix or push. |
|
@MelvinBot please check all items on the author checklist. I also verified this across all platforms. |
|
Done — checked all items on the PR Author Checklist, since you've verified this across all platforms. All 38 checklist boxes are now ticked in the PR description. |
| )} | ||
| {!initialApprovalWorkflow && <FullScreenLoadingIndicator reasonAttributes={{context: 'WorkspaceWorkflowsApprovalsEditPage'}} />} | ||
| {!initialApprovalWorkflow && ( | ||
| <View style={[styles.flex1, styles.fullScreenLoading]}> |
There was a problem hiding this comment.
@MelvinBot is it possible that approvalWorkflow exists while initialApprovalWorkflow doesn't exist?
In that case, this will cause regression of showing loading indicator below Save button.
There was a problem hiding this comment.
Good catch — yes, it's possible, and it's a real regression. Fixed in 3bb2723 by gating the form on initialApprovalWorkflow too, so the two blocks are now mutually exclusive.
When it happens: approvalWorkflow comes from Onyx (WorkspaceWorkflowsApprovalsEditPage.tsx:51) while initialApprovalWorkflow is local useState set inside an effect (:54, :158). On the resume-from-subpage path (returning from member/approver selection), Onyx APPROVAL_WORKFLOW is still populated, so approvalWorkflow is truthy on the first render after mount while initialApprovalWorkflow is still undefined until the effect commits. In that render the old conditions — form on !!approvalWorkflow, loader on !initialApprovalWorkflow — were both true, so the ActivityIndicator rendered below the Save button. (With the previous FullScreenLoadingIndicator this was hidden because it was an absoluteFill overlay; the inline spinner exposes it.)
Fix: the form now renders only when both approvalWorkflow and initialApprovalWorkflow exist (:193), so during that first render only the loader shows, then it swaps to the form once the snapshot is set. This is safe — when currentApprovalWorkflow is missing the page already falls to the not-found view, and the effect always sets both together.
…Save button
Co-authored-by: {"message":"Not Found","documentation_url":"https://docs.github.com/rest/issues/comments#get-an-issue-comment","status":"404"} <{"message":"Not Found","documentation_url":"https://docs.github.com/rest/issues/comments#get-an-issue-comment","status":"404"}@users.noreply.github.com>
|
@MelvinBot pull main |
…lowsApprovalsEditActivityIndicator Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
|
Merged latest |
|
The remaining red checks ( Root cause: Two independently-green PRs collided on About this PR: the branch already has |
|
@MelvinBot pull main again and mark as ready for review |
…lowsApprovalsEditActivityIndicator Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
|
Merged latest Merge commit: b47c025 — pushed to |
|
The checks are already green now — no push from me was needed. What was failing: ESLint, Root cause: The earlier merge of Resolution: A newer merge of |
|
No failing checks to fix — the latest run is green. The earlier The only non-passing entry is |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridApp96826-mobile.moviOS: mWeb SafariMacOS: Chrome / Safari96826.mov |
|
🚧 Julesssss 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 9.4.49-0 🚀
|
Help site review — no docs changes requiredI reviewed the changes in this PR against Expensify's help site content under Conclusion: No help site updates are needed, so I did not create a draft docs PR. Why: This is a purely internal UI implementation change. It swaps the loading state on Since no docs changes are required, there is no linked help site PR to review. @situchan, if you believe any user-facing behavior did change and warrants a docs update, let me know and I'll create the draft PR. |
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.4.49-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Refactors the loading indicator on
WorkspaceWorkflowsApprovalsEditPagefromFullScreenLoadingIndicatortoActivityIndicator, in preparation for making the error/loading page recoverable (enabling the Go Back button by default).The
HeaderWithBackButtonis rendered in the same tree as the loader, so per UI-1 the loader should be anActivityIndicator(navigation is visible, so the user can always escape).FullScreenLoadingIndicatorinstead renders a full-screenabsoluteFilloverlay on top of the visible header, which violates the rule. The loader is now a centeredActivityIndicatorrendered below the header while!initialApprovalWorkflow.Fixed Issues
$ #96094
PROPOSAL:
Tests
WorkspaceWorkflowsApprovalsEditPage).ActivityIndicator) is shown below the header, not a full-screen overlay covering everything.Offline tests
Same as 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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari