-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Details
As part of the loading indicator standardization, we are preparing to enable shouldUseGoBackButton by default in FullscreenLoadingIndicator. Before that, we need to migrate components where FullscreenLoadingIndicator is used alongside visible navigation to use ActivityIndicator instead, otherwise users would see two back controls (the header back button AND the Go Back button from the loader).
BankConnection (native only: index.native.tsx) is the company cards bank connection screen. It has a HeaderWithBackButton with a dynamic title ("Add cards" or "Assign card") and uses FullscreenLoadingIndicator as the renderLoading callback passed to the WebView. Shown while the bank connection WebView loads its initial content. The page is used in the add-new-card flow and assign-card flow, navigated from AddNewCardPage and BrokenCardFeedConnectionPage. The loader appears in the content area below the header when the WebView is in its loading state.
Solution
Replace FullscreenLoadingIndicator with ActivityIndicator in src/pages/workspace/companyCards/BankConnection/index.native.tsx. The replacement must be an ActivityIndicator wrapped in a parent View that provides the same layout and background styling as FullscreenLoadingIndicator. The loading state must be pixel-perfect identical after the change. Same background color, same opacity, same centered large spinner in the content area below the header.
Before making any changes, read the FullscreenLoadingIndicator component source to understand what styles it applies internally, and make sure the replacement reproduces them exactly. ActivityIndicator is a raw spinner with no layout or background styling, so it should not be used on its own as a fullscreen loading state. The codebase convention is to wrap it in a parent View that provides the layout and background styling.
Note: The renderLoading prop expects a React element. Replace the renderLoading callback to return a View wrapping ActivityIndicator with the same layout and background styling as FullscreenLoadingIndicator, rather than using FullscreenLoadingIndicator directly.
Parent issue: #69850