Skip to content

[$125] Use valid loading indicator in LoadingPage.tsx #84590

Closed

Description

@mateuuszzzzz

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).

LoadingPage.tsx renders HeaderWithBackButton and FullscreenLoadingIndicator as siblings inside ScreenWrapper. The back button is always visible during loading, so the user can already escape, FullscreenLoadingIndicator is unnecessary here and should be replaced with a plain ActivityIndicator.

This component is used in:

  • BrokenCardFeedConnectionPage.tsx
  • withReportAndPrivateNotesOrNotFound.tsx

Solution

Replace FullscreenLoadingIndicator with ActivityIndicator in src/pages/LoadingPage.tsx. 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.

Issue OwnerCurrent Issue Owner: @mateuuszzzzz

Activity

  1. PiyushChandra17 commented on Mar 9, 2026

    @PiyushChandra17
  2. self-assigned this
    on Mar 9, 2026
  3. deleted a comment from samranahm on Mar 9, 2026
  4. Julesssss commented on Mar 9, 2026

    @Julesssss
    Contributor

    This is internal

  5. Julesssss commented on Mar 9, 2026

    @Julesssss
    Contributor

    @MelvinBot investigate this

  6. mateuuszzzzz commented on Mar 10, 2026

    @mateuuszzzzz
    ContributorAuthor

    @Julesssss can we re-run it? I updated issue description to be more accurate

  7. mallenexpensify commented on Mar 10, 2026

    @mallenexpensify
    Contributor

    Added Melvin Triage to see if he'll run again (also.. NO idea why I'm here... bye)

  8. MelvinBot commented on Mar 10, 2026

    @MelvinBot
    Contributor

    Updated Proposal

    (Re-run after issue description update requiring pixel-perfect visual match and View wrapper convention)

    Please re-state the problem that we are trying to solve in this issue.

    LoadingPage.tsx renders both HeaderWithBackButton and FullScreenLoadingIndicator as siblings inside ScreenWrapper. When shouldUseGoBackButton is enabled by default in FullScreenLoadingIndicator (as part of the loading indicator standardization in #69850), users will see two back controls — the header back button AND the Go Back button from the loader.

    What is the root cause of that problem?

    LoadingPage.tsx uses FullScreenLoadingIndicator which is designed as a full-screen overlay (with StyleSheet.absoluteFillObject, background color, opacity, z-index, and soon a Go Back button). However, LoadingPage already has its own HeaderWithBackButton, so the Go Back button behavior is redundant. The component currently only works as expected because the passed style={[styles.flex1, styles.pRelative]} overrides the absolute positioning to relative, but it still inherits the full overlay machinery — which will break once shouldUseGoBackButton defaults to true.

    What changes do you think we should make in order to solve the problem?

    In src/pages/LoadingPage.tsx, replace FullScreenLoadingIndicator with a View wrapping an ActivityIndicator that reproduces the exact same visual styling:

    • Remove the FullScreenLoadingIndicator import
    • Add imports for View (from react-native), ActivityIndicator, and CONST
    • Replace <FullScreenLoadingIndicator style={[styles.flex1, styles.pRelative]} /> with:
      <View style={[styles.flex1, styles.fullScreenLoading]}>
          <ActivityIndicator size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE} />
      </View>

    This is pixel-perfect identical because:

    1. styles.fullScreenLoading provides: backgroundColor: theme.componentBG, opacity: 0.8, justifyContent: 'center', alignItems: 'center', zIndex: 10 — matching the exact visual properties from FullscreenLoadingIndicator
    2. styles.flex1 makes the View fill the remaining space below the header — matching the flex: 1 passed via the original style prop
    3. The original absoluteFillObject and pRelative cancel each other out (absolute → relative override), and w100 is redundant in a flex-1 child — so they can all be dropped
    4. The inner <View style={styles.w100}> from FullscreenLoadingIndicator has no visual effect since the parent already centers its children via justifyContent/alignItems
    5. The custom ActivityIndicator component automatically applies theme.spinner color

    This pattern (View + flex1 + fullScreenLoading + large ActivityIndicator) is the established codebase convention, already used in HelpContent.tsx at line 129.

    What alternative solutions did you explore? (Optional)

    Using a bare <ActivityIndicator style={[styles.flex1]} /> without a wrapping View was considered, but this would not reproduce the background color (theme.componentBG) and opacity (0.8) from the current implementation. The codebase convention is to wrap ActivityIndicator in a parent View that provides layout and background styling.


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  9. deleted a comment from MelvinBot on Mar 10, 2026
  10. Julesssss commented on Mar 10, 2026

    @Julesssss
    Contributor

    @MelvinBot implement this

  11. MelvinBot commented on Mar 10, 2026

    @MelvinBot
    Contributor

    🤖 Draft PR created: #84798
    Please mark it as "Ready for review" when it is ready for review.

  12. Julesssss commented on Mar 10, 2026

    @Julesssss
    Contributor

    PR looks great: #84798

  13. added
    InternalRequires API changes or must be handled by Expensify staff
    on Mar 16, 2026
  14. changed the title [-]Use valid loading indicator in `LoadingPage.tsx`[/-] [+][$125] Use valid loading indicator in `LoadingPage.tsx`[/+] on Mar 16, 2026
  15. melvin-bot commented on Mar 16, 2026

    @melvin-bot

    ⚠️ Could not update price automatically because there is no linked Upwork Job ID. The BZ team member will need to update the price manually in Upwork.

  16. melvin-bot commented on Apr 8, 2026

    @melvin-bot

    This issue has not been updated in over 15 days. @Julesssss, @mateuuszzzzz eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

EngineeringImprovementItem broken or needs improvement.InternalRequires API changes or must be handled by Expensify staffMelvin TriageAutomatic AI Analysis of an issueMonthlyKSv2ReviewingHas a PR in reviewTask

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions