Repository navigation
Refactor CardAuthenticationModal loader to ActivityIndicator - #96822
Conversation
Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
I checked all the checks on this PR after they finished running. Every real check passed — Bun tests, all 8 The only failing check is
To clear this check: the human co-author needs to fill out the |
|
@MelvinBot add Tests/QA steps |
|
Here are suggested Tests and QA steps for this change. Since Tests
QA StepsSame as Tests, on staging (web / desktop only — the modal does not render on native). Focus on:
|
| <View style={[StyleSheet.absoluteFill, styles.fullScreenLoading]}> | ||
| <ActivityIndicator | ||
| size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE} | ||
| reasonAttributes={reasonAttributes} | ||
| /> | ||
| </View> |
There was a problem hiding this comment.
@MelvinBot can we use existing LoadingIndicator component?
There was a problem hiding this comment.
Yes — good call. LoadingIndicator is basically the reusable form of the wrapper this PR builds inline: it already renders <View style={[StyleSheet.absoluteFill, styles.fullScreenLoading, ...]}> around a LARGE ActivityIndicator and accepts reasonAttributes. FullScreenLoadingIndicator is just that plus the Go Back button / timeout / skeleton span that we're intentionally dropping here.
So this block:
{isLoading && (
<View style={[StyleSheet.absoluteFill, styles.fullScreenLoading]}>
<ActivityIndicator
size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE}
reasonAttributes={reasonAttributes}
/>
</View>
)}collapses to:
{isLoading && <LoadingIndicator reasonAttributes={reasonAttributes} />}That also lets us drop the newly-added StyleSheet import and the direct ActivityIndicator import. Since it's rendered inside the content <View style={[styles.flex1]}> (below the header), the absoluteFill still scopes the overlay to the iframe area exactly as intended — the iframe stays mounted underneath so onLoad still fires.
Want me to push this change?
There was a problem hiding this comment.
Done — pushed d2a2136. Swapped the inline overlay for <LoadingIndicator reasonAttributes={reasonAttributes} /> and dropped the now-unused StyleSheet and ActivityIndicator imports. Net -10 / +3.
Verified locally: oxfmt, ESLint (changed file clean — the one remaining warning is a pre-existing grandfathered set-state-in-effect), and the React Compiler compliance check all pass. typecheck-tsgo only surfaces pre-existing ResultMetadata errors in unrelated files (useCardsList, useSidebarOrderedReports, OnyxDerived, etc.) — nothing in this file.
|
The only failing check is PR Author Checklist / checklist, and it's not a code or test failure — it's the human-only checklist:
Every actual CI check is green — This check can only be cleared by a human completing the checklist (and filling in the |
|
Both currently-failing checks are human-only checklists, not code or test failures:
All actual CI checks are green ( |
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>
|
A new commit (
Every real CI check passed on the new commit — There's no code fix to push. This check clears only when a human completes the checklist and fills in the |
|
The two failing checks are PR Author Checklist / checklist and PR Reviewer Checklist / checklist — both are human-only checklists (each must have every box manually checked), not code or test failures. All real CI checks are green. There's nothing here I can fix by pushing code: the author checklist clears when the human co-author completes it (and fills in the still- |
|
@MelvinBot please update QA steps and check all items on the author checklist. I also verified this across all platforms. |
|
Updated the PR body per your request:
I also filled in the Tests section with the same steps, since the checklist item "I added steps for local testing in the One thing left for you: the Screenshots/Videos section is still empty — please drop in your per-platform captures, since I can't attach those on your behalf. |
|
@MelvinBot mark as ready for review |
|
✅ Marked this PR as ready for review. Verification before flipping out of draft:
I could not capture a live web screenshot of the loader: the real |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari96822.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! 🧪🧪
|
|
@situchan Applause does not have 3DS enabled card, could this be verified internally? Or is there any workaround? |
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 9.4.49-0 🚀
|
|
🤖 Docs review: no help-site changes required. This PR is a purely visual/internal refactor — it moves the loading spinner on the 3DS The help site's 3DS/Expensify Card articles document the behavior of the authentication flow (approving/denying transactions, biometrics, passkeys, magic codes), not the transient position of a loading spinner while the authentication page loads:
None of these describe the loader, so nothing needs updating. No draft docs PR was created.
|
|
@situchan @Julesssss this change seems simple enough so I'm going to check this off without QA. Please verify on your own if needed |
|
🚀 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
CardAuthenticationModalfromFullScreenLoadingIndicatortoActivityIndicator, in preparation for making the error/loading page recoverable (enabling the Go Back button by default).FullScreenLoadingIndicatorrenders as a full-screenabsoluteFilloverlay that sits on top of the visible header/back/close button, which violates UI-1: when navigation is visible alongside the loader, we should useActivityIndicator.This is not a plain swap.
isLoadingis cleared by the iframe'sonLoadcallback. Conditionally rendering a loader branch instead of the iframe would prevent the iframe from ever mounting, soonLoadwould never fire and the spinner would deadlock. Instead, the iframe stays mounted and the spinner is rendered as an overlay scoped to the content area — below the header. The header stays visible/interactive and the iframe continues to load underneath.Fixed Issues
$ #96094
PROPOSAL:
Tests
CardAuthenticationModal) — e.g. pay a subscription / add a payment card that requires 3DS authentication.Offline tests
QA Steps
CardAuthenticationModal) — e.g. pay a subscription / add a payment card that requires 3DS authentication.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