App icon indicating copy to clipboard operation
App copied to clipboard

[Due for payment 2026-12-04] [$175] Android - Insights - Spend Over Time menu is covered by + button in landscape

Open applause-bot[bot] opened this issue 3 weeks ago • 36 comments

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.33-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://github.com/Expensify/App/pull/104569 Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Samsung Galaxy S21/Android 15 App Component: Other

Action Performed:

Precondition: create a new Expensifail account and enable insightsCompliance overrides

  1. Launch Expensify app
  2. Log in with valid credentials
  3. Open Insights.
  4. Select Spend Over Time.
  5. Rotate the device to landscape.
  6. Try to tap the three-dot menu in the top-right corner.

Expected Result:

The three-dot menu should be fully visible and accessible in landscape mode.

Actual Result:

The + button covers the three-dot menu, preventing access to it.

Workaround:

Unknown

Platforms:

  • [x] Android: App
  • [ ] Android: mWeb Chrome
  • [ ] iOS: App
  • [ ] iOS: mWeb Safari
  • [ ] iOS: mWeb Chrome
  • [ ] Windows: Chrome
  • [ ] MacOS: Chrome Safari

Screenshots/Videos

https://github.com/user-attachments/assets/8a792c24-653e-40fd-8e5b-2da342b63868

View all open jobs on GitHub

Applause Internal Information Exported by: Chandana Kiran Bug ID: 7306669

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @jayeshmangwani

applause-bot[bot] avatar Nov 06 '26 20:11 applause-bot[bot]

While Applause doesn't embed attachments for this bug, here are the links for quick view: https://platform.applause.com/services/links/v1/external/e0a8fb486ce95e8f4f91b03fac055f094e5c3ece1d70a566a50ac48630226cab

applause-bot[bot] avatar Nov 06 '26 20:11 applause-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (External)

melvin-bot[bot] avatar Nov 06 '26 20:11 melvin-bot[bot]

Job added to Upwork: https://www.upwork.com/jobs/~022118797722912950531

melvin-bot[bot] avatar Nov 06 '26 20:11 melvin-bot[bot]

🤖 Web test steps verification results: ⚠️ partial

Verified on dev NewDot web only. Insights opens, but the account has no expenses and shows an empty state; Spend Over Time is unavailable, so testing stopped.

Insights empty state with no Spend Over Time option
Step Status
1: App is openHome displayed app navigation and expense actions.
✅
2: Existing account is authenticatedAuthenticated Home displayed Account settings.
✅
3: Open InsightsInsights displayed its no-expenses empty state.
Insights empty state with no Spend Over Time option
✅
4: Select Spend Over TimeBlocked: the chart was absent.
⚠️
5: Inspect controls in landscapeNot executed because the chart was unavailable.
⚠️
6: Open the three-dot menuNot executed. The reported bug was not reproduced.
⚠️

⚠️ Preliminary analysis — low confidence

Suspected cause: the native global “+” button can overlap chart controls because it is positioned independently above the screen content. Its native overlay has no collision avoidance for the chart menu.

Supporting code evidence and alternatives
  • The Android FAB anchor combines with shared FAB positioning to place the button above the bottom bar.
  • Insights keeps its header outside the chart scroller on native, reducing available landscape space (dashboard layout).
  • These facts support a possible collision, but do not establish that the FAB and ellipsis intersect on the reported device. Header clipping or scroll constraints remain alternatives.
  • An empty account cannot exercise this path: Insights renders an empty state instead of chart widgets (render branches).

Needed to confirm: use an account with a rendered Spend Over Time chart and capture the native FAB/menu bounds, bottom inset, and scroll position after rotation. No specific fix or introducing PR is confirmed; changing spacing now would be speculative.


view run

MelvinBot avatar Nov 06 '26 20:11 MelvinBot

Proposal

What is the root cause of that problem?

There are two interconnected causes for this layout collision:

  1. The main header is pinned as a fixed non-scrolling element on native landscape:
    In src/pages/Insights/InsightsDashboard.tsx:

    const shouldScrollMainHeader = useIsMobileWebLandscape();
    

    However, src/hooks/useIsMobileWebLandscape/index.native.ts is hardcoded to return false on native:

    function useIsMobileWebLandscape(): boolean {
        return false;
    }
    

    Because shouldScrollMainHeader is always false on native, InsightsDashboard.tsx (lines 409 & 436) renders the header (TopBar + TabSelector + PageControls) as a fixed non-scrolling component outside the ScrollView:

    {!shouldScrollMainHeader && header}
    <View style={styles.flex1}>
        <Animated.View style={StyleSheet.absoluteFill}>
            <InsightsDashboardContent ...>
                {shouldScrollMainHeader && header}
            </InsightsDashboardContent>
        </Animated.View>
    </View>
    

    On a mobile device in landscape (e.g. Galaxy S21), total vertical viewport height is only ~360px–400px. The fixed header (~144px) plus the native bottom navigation bar (~80px) consumes almost the entire screen, leaving only ~140px for the ScrollView. The chart widget cannot scroll up freely, trapping the chart header in the compressed vertical space directly underneath the floating button.

  2. Inadequate bottom scroll padding for the native FAB:
    In src/components/Navigation/TabBarBottomContent/useTabRootScrollProps/index.tsx:

    additionalPaddingBottom: StyleUtils.getFloatingTabBarHeight(isInLandscapeMode) + variables.floatingTabBarBottomInset,
    

    StyleUtils.getFloatingTabBarHeight(isInLandscapeMode) only reserves 44px–60px for the tab bar. However, on Android, the FAB is positioned above the Material navigation bar at:

    androidNativeTabBarFloatingButtonsBottom: 96,
    

    and has a height of variables.componentSizeLarge (56px) plus margins, totaling ~152px–160px from the bottom. Because the ScrollView only reserves room for the tab bar and not the elevated FAB, the bottom/right portion of the content cannot scroll above the FAB.


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

  1. Allow the main header to scroll with content on native mobile in landscape:
    Update src/hooks/useIsMobileWebLandscape/index.native.ts to return true on mobile phones in landscape mode:

    import useIsInLandscapeMode from '@hooks/useIsInLandscapeMode';
    import useResponsiveLayout from '@hooks/useResponsiveLayout';
    
    function useIsMobileWebLandscape(): boolean {
        const {shouldUseNarrowLayout} = useResponsiveLayout();
        const isInLandscapeMode = useIsInLandscapeMode();
        return isInLandscapeMode && shouldUseNarrowLayout;
    }
    
    export default useIsMobileWebLandscape;
    

    When shouldScrollMainHeader is true:

    • The header (TopBar, tabs, controls) moves inside the scroll view ({shouldScrollMainHeader && header}).
    • As the user scrolls, the header moves out of the viewport, granting the Spend Over Time chart the full vertical height of the screen (~360px–400px).
    • The chart's three-dot menu scrolls cleanly to the top, well above the reach of the bottom-anchored FAB.
  2. Ensure proper bottom clearance for the FAB in landscape:
    In useTabRootScrollProps/index.tsx, when on a native tab root in landscape where the FAB overlay is present, add the necessary bottom clearance (variables.androidNativeTabBarFloatingButtonsBottom + variables.componentSizeLarge) so content at the bottom of the scroll container can scroll completely clear of the floating action button.


What alternative solutions did you explore? (Optional)

  1. Hiding the FAB on Insights in landscape: While hiding the FAB (display: 'none') in landscape would prevent the collision, the FAB is a core navigation element for the global Create flow across tab roots. Enabling the header to scroll and providing adequate scroll padding is the standard Expensify pattern (as seen in WorkspaceListLayout and useSearchListContentContainerStyle), preserving full functionality while completely resolving the collision.

Contributor details

Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~0131dae36abcf59374

kevinjosh10 avatar Nov 06 '26 20:11 kevinjosh10

Proposal

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

En Android, el botón «+» tapa el menú de Spend Over Time al rotar a landscape. No hay función, archivo ni línea culpable verificados: la propuesta todavía no es técnicamente defendible.

What is the root cause of that problem?

No demostrada. El solapamiento reportado no prueba si falla el posicionamiento del FAB, el espacio desplazable o el encabezado fijo.

La actividad del issue contradice el contexto proporcionado: MelvinBot publicó un análisis preliminar, pero no reprodujo el fallo porque su cuenta no mostraba el gráfico. Otro candidato ya propone modificar el encabezado y el padding: existe riesgo de presentar la misma hipótesis sin evidencia adicional.

No pude obtener los archivos fuente; atribuir líneas exactas sería inventarlas.

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

Rechazar cualquier diff presentado como solución confirmada. Primero hacen falta medidas nativas tras rotación: límites del FAB y menú, viewport, insets y desplazamiento máximo.

Solo entonces puede decidirse entre corregir el anclaje o permitir que el contenido supere el FAB. Un cambio de 3–10 líneas sin comprobar esas condiciones no constituye evidencia.

Compare branch: https://github.com/Expensify/App/compare/main...camesenin:App:fix-issue-106257?expand=1

Enlace no verificado; no acredita una rama ni un parche existente.

What alternative solutions did you explore? (Optional)

Modificar globalmente useIsMobileWebLandscape/index.native.ts exige auditar sus consumidores: extender un hook web a native puede alterar otras pantallas. Añadir padding tampoco garantiza resolver un encabezado atrapado fuera del scroll.

What automated tests can you add to prevent this from re-occurring?

Una prueba nativa debe renderizar datos, rotar y abrir el menú. Jest puede comprobar condiciones de layout, pero no demuestra ausencia de solapamiento físico; no se verificó un archivo de tests existente.

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~01b60d704ba377be83

camesenin avatar Nov 06 '26 23:11 camesenin

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

melvin-bot[bot] avatar Nov 06 '26 23:11 melvin-bot[bot]

Proposal

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

On Android, opening Insights > Spend Over Time and rotating to landscape leaves the three-dot menu in the top-right covered by the global + (FAB) button, so the menu cannot be tapped.

What is the root cause of that problem?

The + button is a global overlay (FloatingActionButtonAndPopover, rendered in the sidebar tab bar) with no route-based exclusion: it is shown on every screen regardless of what is focused. On a narrow landscape layout the FAB's fixed position overlaps the Insights details screen's header menu area. MelvinBot's web verification could not reproduce this because it only tested the web layout with an empty Insights state — the overlap is a native narrow-landscape layout issue.

What changes do you think are needed to solve the problem?

Gate FloatingActionButtonAndPopover on the focused route so the FAB is hidden while the Insights details screen (SCREENS.RIGHT_MODAL.INSIGHTS_DETAILS) is focused on a narrow layout, and restore it on every other screen. If the reviewer prefers the menu moved instead, I will shift the header menu clear of the FAB — but hiding the FAB on this full-screen route is the smaller, safer change and matches how full-screen flows should behave.

What alternative solutions did you explore?

Lowering the FAB's z-index or moving it — that would break the FAB's intended always-on-top behaviour on the screens where it belongs. Hiding it only while this route is focused keeps the change scoped to the reported screen.

What will you do to verify the fix?

Reproduce on Android landscape: Insights > Spend Over Time, rotate, confirm the three-dot menu is fully visible and tappable; confirm the FAB returns on the LHN and other screens; confirm portrait layout is unchanged.

khizzcr7 avatar Nov 07 '26 00:11 khizzcr7

Proposal

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

On Android, when a user opens Insights → Spend Over Time and rotates the device to landscape, the global floating + button (FAB) overlaps and covers the three-dot menu (WidgetHeaderMenu) in the top-right corner of the chart widget, making it inaccessible.

What is the root cause of that problem?

The root cause is that useIsMobileWebLandscape is hardcoded to return false on native, which prevents the Insights dashboard header from scrolling with content on native landscape — leaving the chart widget's header (with its three-dot menu) trapped in the tiny remaining vertical space where the FAB overlay sits.

The chain:

  1. InsightsDashboard.tsx line 102:

    const shouldScrollMainHeader = useIsMobileWebLandscape();
    

    And lines 405 & 431:

    {!shouldScrollMainHeader && header}                    // header rendered FIXED outside ScrollView
    <View style={styles.flex1}>
        <Animated.View style={StyleSheet.absoluteFill}>
            <InsightsDashboardContent ...>
                {shouldScrollMainHeader && header}          // header inside ScrollView only if true
            </InsightsDashboardContent>
        </Animated.View>
    </View>
    
  2. useIsMobileWebLandscape/index.native.ts lines 4–6 — always returns false on native:

    function useIsMobileWebLandscape(): boolean {
        return false;
    }
    

    The comment says "native has more vertical space," but that assumption breaks on phones in landscape (e.g. Galaxy S21: ~360–400px viewport height). The web implementation (index.ts) correctly returns useIsInLandscapeMode().

  3. Because shouldScrollMainHeader is always false on native, the header (TopBar + TabSelector + PageControls, ~144px) is rendered as a fixed, non-scrolling element outside the ScrollView (line 405). Combined with the native bottom tab bar (~80px), only ~140px remains for the chart content. The chart widget header (with the three-dot menu) cannot scroll up, so it sits compressed directly under the fixed header — in the same screen region where the FAB overlay (NativeTabBarOverlay.tsx lines 42–67 + floatingActionButtonPosition at styles/index.ts lines 2062–2067, top: -72, right: 16) is drawn on top.

  4. The FAB is a global overlay with no per-route exclusion: NativeTabBarOverlay renders NavigationTabBarFloatingActionButton on every narrow-layout tab screen whenever shouldShowNativeTabBar is true (line 43). It has no awareness of whether the focused route is the Insights details screen, so it always draws on top.

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

Primary fix — let the header scroll on native phones in landscape (src/hooks/useIsMobileWebLandscape/index.native.ts):

import useIsInLandscapeMode from '@hooks/useIsInLandscapeMode';
import useResponsiveLayout from '@hooks/useResponsiveLayout';

function useIsMobileWebLandscape(): boolean {
    const {shouldUseNarrowLayout} = useResponsiveLayout();
    const isInLandscapeMode = useIsInLandscapeMode();
    return isInLandscapeMode && shouldUseNarrowLayout;
}

When shouldScrollMainHeader becomes true on a native phone in landscape:

  • The header moves inside the ScrollView (line 431), so it scrolls away as the user scrolls down.
  • The chart widget's three-dot menu can scroll to the top of the viewport, well clear of the bottom-anchored FAB.
  • This matches the existing pattern used on web and preserves the FAB's global always-on-top behavior.

This is scoped to narrow layouts only (shouldUseNarrowLayout), so tablets in landscape (wide layout) are unaffected — they already have enough vertical space, which is what the original false was meant to protect.

What specific scenarios should be covered by automated tests?

  1. On a narrow native layout in landscape: Insights → Spend Over Time → scroll down → verify the header scrolls out of view and the chart's three-dot menu is fully visible/tappable (not covered by FAB).
  2. On a narrow native layout in portrait: verify the header remains fixed (no regression — useIsInLandscapeMode returns false).
  3. On a wide layout (tablet) in landscape: verify useIsMobileWebLandscape still returns false (header stays fixed, no change).
  4. On web landscape: verify no regression (already returns true via index.ts).
  5. Verify the FAB is still visible and functional on the Insights screen and all other tab screens.

What alternative solutions did you explore?

  • Hide the FAB on the Insights details route (SCREENS.RIGHT_MODAL.INSIGHTS_DETAILS) when focused on a narrow layout. This prevents the collision but removes a core navigation element from a screen where the user may want to create a new expense — and it only fixes Insights, not any other screen that might have the same overlap in landscape. Making the header scroll is the standard Expensify pattern (used by WorkspaceListLayout, useSearchListContentContainerStyle) and fixes the root cause for all narrow-landscape screens.
  • Increase bottom scroll padding to push content above the FAB. This doesn't help when the header is fixed outside the scroll view — the menu is trapped above the scroll content, not below it.

PR

PR will be linked here once created.

vanshshah11 avatar Nov 07 '26 00:11 vanshshah11

Proposal

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

On Android in landscape orientation, when navigating to Insights > Spend Over Time, the three-dot widget menu button (WidgetHeaderMenu) on the right side of the page is covered by the floating + create button (FloatingActionButtonAndPopover), preventing the user from tapping the three-dot menu.

What is the root cause of that problem?

There are two interacting causes on native mobile landscape:

  1. In src/components/Navigation/NavigationTabBar/index.tsx and FloatingActionButtonAndPopover.tsx, on narrow layout (shouldUseNarrowLayout), when the device is in landscape orientation with the vertical left navigation bar, the global + Floating Action Button (FloatingActionButtonAndPopover) is positioned as a floating overlay on the right side of the screen.
  2. In src/pages/Insights/InsightsDashboard.tsx (line 45) and the Insights chart detail view (SpendOverTime / InsightsPage), shouldScrollMainHeader is computed via useIsMobileWebLandscape(), which returns false on native Android (src/hooks/useIsMobileWebLandscape.ts checks isMobile() which only detects mobile web browsers, not native Android/iOS). In addition, the Insights detail screen keeps the global NavigationTabBar (and its floating + FAB) mounted without reserving right-side clearance or hiding the FAB, causing the floating + button to sit directly on top of the WidgetHeaderMenu three-dot button in landscape mode.

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

  1. In src/pages/Insights/InsightsDashboard.tsx (and the Insights detail layout), use a hook/check that includes native mobile landscape (isInLandscapeMode && shouldUseNarrowLayout via useWindowDimensions and useResponsiveLayout) rather than only useIsMobileWebLandscape() so native Android/iOS landscape scrolls the header/content consistently with mobile web landscape.
  2. Ensure the Insights detail view / WidgetHeaderMenu container applies sufficient right margin/padding clearance (or hides the floating + button on Drill-down Insights widget detail pages when isInLandscapeMode && shouldUseNarrowLayout is true) so the three-dot WidgetHeaderMenu button is never overlapped by FloatingActionButtonAndPopover.

What alternative solutions did you explore? (Optional)

We also considered repositioning the + FAB to the bottom-left inside the vertical NavigationTabBar in landscape mode across all screens, but keeping the FAB position consistent while allowing Insights headers/menus to scroll and clear the FAB area avoids changing global navigation ergonomics.

jeffrey-graham avatar Nov 07 '26 01:11 jeffrey-graham

📣 @jeffrey-graham! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

melvin-bot[bot] avatar Nov 07 '26 01:11 melvin-bot[bot]

Proposal

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

When viewing the Insights tab (Spend dashboard) in narrow landscape orientation on Android (and mWeb before scrolling), the 3-row Insights header (TopBar + InsightsTabSelector + InsightsPageControls) occupies the upper ~156dp of the viewport while the bottom tab bar and floating action buttons (NavigationTabBarFloatingActionButton + button and FloatingCameraButton) occupy the bottom-right edge (right: 16). On native Android, the Insights header stays pinned at the top when scrolling, leaving zero vertical gap between the bottom of InsightsPageControls and the floating buttons on the right edge—so the three-dot menu button (WidgetHeaderMenu) on the Spend over time chart card stays covered by the floating + / Camera buttons and passes directly underneath the pinned header when scrolling down, making it unreachable.

What is the root cause of that problem?

  1. In src/pages/Insights/InsightsDashboard.tsx (inside both InsightsDashboardContent at line 104 and InsightsDashboard at line 290, introduced in PR #105504), header scrolling is gated on useIsMobileWebLandscape():
    const shouldScrollMainHeader = useIsMobileWebLandscape();
    
  2. On web (src/hooks/useIsMobileWebLandscape/index.ts), useIsMobileWebLandscape() returns useIsInLandscapeMode(), which moves header (TopBar, InsightsTabSelector, and InsightsPageControls) inside <InsightsDashboardContent>'s <ScrollView> ({shouldScrollMainHeader && header} at line 436) so that scrolling down scrolls the 156dp 3-row header off the top of the viewport and brings the Spend over time card header (WidgetHeaderMenu) into the upper half of the screen, well above the floating + button.
  3. On native (src/hooks/useIsMobileWebLandscape/index.native.ts), useIsMobileWebLandscape() is hardcoded to return false. As a result, {!shouldScrollMainHeader && header} (line 409) keeps all three rows of the Insights header (TopBar + InsightsTabSelector + InsightsPageControls, ~156dp tall) pinned above the <ScrollView>.
  4. Meanwhile, on Android native (src/components/Navigation/TopLevelNavigationTabBar/NativeTabBarOverlay.tsx:59-65), nativeTabBarFloatingButtonsContainer (bottom: variables.androidNativeTabBarFloatingButtonsBottom = 96dp, right: 16dp) renders both NavigationTabBarFloatingActionButton (+ button) and FloatingCameraButton stacked vertically above the native bottom tab bar. On a narrow landscape phone viewport (~340–380dp tall), the ~156dp pinned Insights header from the top and the ~180dp bottom tab bar + stacked FABs from the bottom meet at the vertical center on the right edge (right: 16dp). Consequently, at scrollTop = 0 the Spend over time three-dot menu (WidgetHeaderMenu in src/components/Charts/components/InsightsChartWidget.tsx:165) sits directly behind the + FAB, and scrolling down moves it behind FloatingCameraButton and immediately under the pinned InsightsPageControls bar without ever becoming tappable.

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

In src/pages/Insights/InsightsDashboard.tsx, use useIsInLandscapeMode() (or isInLandscapeMode && shouldUseNarrowLayout from useResponsiveLayout()) for shouldScrollMainHeader in both InsightsDashboardContent and InsightsDashboard instead of useIsMobileWebLandscape():

  1. In InsightsDashboardContent (src/pages/Insights/InsightsDashboard.tsx:104), replace useIsMobileWebLandscape() with useIsInLandscapeMode() (or const {isInLandscapeMode, shouldUseNarrowLayout} = useResponsiveLayout(); const shouldScrollMainHeader = isInLandscapeMode && shouldUseNarrowLayout;):
    const isInLandscapeMode = useIsInLandscapeMode();
    const shouldScrollMainHeader = isInLandscapeMode && shouldUseNarrowLayout;
    
  2. In InsightsDashboard (src/pages/Insights/InsightsDashboard.tsx:290), where shouldUseNarrowLayout is already destructured from useResponsiveLayout() at line 289 (const {shouldUseNarrowLayout, isInLandscapeMode} = useResponsiveLayout();), derive shouldScrollMainHeader directly:
    const {shouldUseNarrowLayout, isInLandscapeMode} = useResponsiveLayout();
    const shouldScrollMainHeader = isInLandscapeMode && shouldUseNarrowLayout;
    

Because InsightsDashboard renders {shouldScrollMainHeader && header} directly as a child inside <ScrollView> (unlike SearchPageNarrow, which relies on a web-only DOM ScrollAwayHeaderContainer), moving header inside <ScrollView> works natively on Android and iOS without any platform-specific DOM APIs. In narrow landscape on native, scrolling down now scrolls the 3-row Insights header (TopBar + InsightsTabSelector + InsightsPageControls) away with the content, allowing the Spend over time card and its WidgetHeaderMenu three-dot button to scroll cleanly above the floating + and Camera buttons.

What alternative solutions did you explore? (Optional)

  • Changing src/hooks/useIsMobileWebLandscape/index.native.ts to return isInLandscapeMode && shouldUseNarrowLayout (or useIsInLandscapeMode()): Rejected because changing useIsMobileWebLandscape/index.native.ts globally causes a severe regression on the Spend (SearchPageNarrow) screen in native landscape:
    • In src/pages/Search/SearchPageNarrow/index.tsx:58, 381-407, when shouldScrollMainHeader (useIsMobileWebLandscape()) is true, SearchPageNarrow stops rendering the fixed header ({!shouldScrollMainHeader && !isMobileSelectionModeEnabled && ...}) and delegates header rendering to <ScrollAwayHeaderContainer isEnabled={shouldScrollMainHeader} header={...}>.
    • However, src/pages/Search/SearchPageNarrow/ScrollAwayHeaderContainer/index.native.tsx:8-13 is a no-op stub (/** The header never scrolls away on native. */ return <View style={styles.flex1}>{children}</View>;) that completely ignores the header prop, and src/hooks/useSearchListContentContainerStyle.ts:16 omits styles.searchListContentContainerStyles(hasFilterBars) when shouldScrollMainHeader is true.
    • Therefore, returning true from useIsMobileWebLandscape/index.native.ts makes the entire Spend/Search header (TopBar, Search input, Type menu, and Filters bar) vanish completely on Android and iOS in landscape. Scoping the change to InsightsDashboard.tsx (which uses a standard React Native <ScrollView>) fixes Insights in native landscape without breaking SearchPageNarrow.
  • Adding extra paddingBottom to <ScrollView>'s contentContainerStyle in InsightsDashboard.tsx: Rejected because paddingBottom only adds space after the last chart at the bottom of the scroll content (Top categories). Spend over time is the first card at the top of <ScrollView>, and scrolling down moves content upward toward the top of the screen—so paddingBottom has no effect on the overlap between the pinned top header, the first card, and the floating buttons.

tungnguyen84 avatar Nov 07 '26 02:11 tungnguyen84

Proposal

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

On Android in landscape orientation, navigating to Insights > Spend Over Time results in the floating + button (FAB) overlapping and obstructing the top-right three-dot menu (WidgetHeaderMenu) in InsightsChartWidget.

What is the root cause of that problem?

In src/pages/Insights/charts/InsightsChartWidget.tsx (lines 193-198), the header action container renders WidgetHeaderMenu:

<View style={[styles.flexRow, styles.alignItemsCenter, styles.flexShrink1]}>
    {headerMenu}
</View>

In mobile landscape mode, the screen height is heavily constrained while the global floating action button (FloatingActionButtonAndPopover) remains positioned at the right with a high z-index. Because InsightsChartWidget does not apply horizontal clearance or scroll padding to account for the FAB in landscape, the FAB overlays directly on top of the three-dot menu.

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

  1. In src/pages/Insights/charts/InsightsChartWidget.tsx, check layout dimensions using useResponsiveLayout():
const {isSmallScreenWidth} = useResponsiveLayout();
  1. Apply right padding to the header controls container when rendered on compact landscape mobile viewports so that WidgetHeaderMenu sits safely clear of the FAB footprint:
<View style={[styles.flexRow, styles.alignItemsCenter, styles.flexShrink1, isSmallScreenWidth && styles.pr8]}>
    {headerMenu}
</View>
  1. Ensure the parent ScrollView in the Insights dashboard provides bottom/right content container padding (styles.pb10) so that when the user scrolls the chart into view in landscape, interactive controls never get clipped or trapped underneath the floating create button.

What alternative solutions did you explore?

Hiding the FAB on the Insights tab in landscape orientation entirely, but maintaining the global + create button consistent across all workspace tabs is an established NewDot standard. Adding proper safe-zone padding to the header controls preserves full usability for both the three-dot menu and the create action.

TassioSales avatar Nov 07 '26 16:11 TassioSales

📣 @TassioSales! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

melvin-bot[bot] avatar Nov 07 '26 16:11 melvin-bot[bot]

Proposal

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

On the Android app in landscape mode, when scrolling through the Insights page, the three-dot menu (WidgetHeaderMenu) on the Spend over time card cannot be accessed because the header (TopBar + InsightsTabSelector + InsightsPageControls) stays pinned at the top of the screen while the floating + and Camera action buttons cover the bottom-right area, leaving no unobstructed vertical space for the card's three-dot menu on the right side.

What is the root cause of that problem?

In src/pages/Insights/InsightsDashboard.tsx (lines 104 and 290), InsightsDashboard decides whether the main header (TopBar + InsightsTabSelector + InsightsPageControls, ~156dp tall) should stay pinned outside <ScrollView> or scroll away inside <ScrollView> using useIsMobileWebLandscape():

// src/pages/Insights/InsightsDashboard.tsx (lines 104 and 290)
const shouldScrollMainHeader = useIsMobileWebLandscape();

And at lines 409 and 436:

{!shouldScrollMainHeader && header}
...
<ScrollView ...>
    {shouldScrollMainHeader && header}

However, the native implementation src/hooks/useIsMobileWebLandscape/index.native.ts is hardcoded to return false:

export default function useIsMobileWebLandscape(): boolean {
    return false;
}

On an Android phone in landscape mode (~360dp total viewport height), keeping the ~156dp header fixed outside <ScrollView> while the bottom tab bar (~56dp) and floating + / Camera buttons (bottom: 96dp, right: 16dp) occupy the bottom-right of the screen leaves a tiny scrollable band where the right edge is completely covered by the floating + button. As a result, the three-dot menu on the Spend over time header cannot be scrolled into an uncovered region.

Important caveat why useIsMobileWebLandscape/index.native.ts cannot simply be changed to return true globally: useIsMobileWebLandscape is also used by src/pages/Search/SearchPageNarrow/index.tsx (line 103), which passes shouldScrollMainHeader into ScrollAwayHeaderContainer. On native (src/components/ScrollAwayHeaderContainer/index.native.tsx), ScrollAwayHeaderContainer is a no-op stub that ignores the header prop completely and only renders {children}! If useIsMobileWebLandscape/index.native.ts were changed to return true, the entire search header (TopBar + SearchTypeMenuNarrow + SearchFiltersBar) would vanish on native Android/iOS in landscape mode.

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

In src/pages/Insights/InsightsDashboard.tsx, InsightsDashboard does not use ScrollAwayHeaderContainer—it renders {shouldScrollMainHeader && header} directly inside its standard React Native <ScrollView> (line 436 and line 173), which works identically on both web and native.

Replace useIsMobileWebLandscape() in src/pages/Insights/InsightsDashboard.tsx (lines 104 and 290) with shouldUseNarrowLayout && isInLandscapeMode from useResponsiveLayout():

// src/pages/Insights/InsightsDashboard.tsx
const {shouldUseNarrowLayout, isInLandscapeMode} = useResponsiveLayout();
const shouldScrollMainHeader = shouldUseNarrowLayout && isInLandscapeMode;

(In InsightsDashboardContent, shouldUseNarrowLayout is already destructured from useResponsiveLayout() at line 289, so we only need const {shouldUseNarrowLayout, isInLandscapeMode} = useResponsiveLayout(); and const shouldScrollMainHeader = shouldUseNarrowLayout && isInLandscapeMode; in both InsightsDashboardEmptyState and InsightsDashboardContent.)

This allows the Insights header to scroll inside <ScrollView> on narrow landscape screens across both Mobile Web and native Android/iOS so the Spend over time three-dot menu can be scrolled into the upper viewport well above the floating + button, without breaking SearchPageNarrow on native.

What alternative solutions did you explore? (Optional)

  • Updating src/hooks/useIsMobileWebLandscape/index.native.ts to return shouldUseNarrowLayout && isInLandscapeMode: As noted above, SearchPageNarrow relies on useIsMobileWebLandscape() returning false on native because ScrollAwayHeaderContainer/index.native.tsx drops the header prop. Scoping the change to InsightsDashboard.tsx (which scrolls the header inside <ScrollView> directly) fixes Insights on native landscape safely without breaking Search.
  • Adding extra paddingBottom to <ScrollView>: Even with extra bottom padding, when the fixed header occupies the top ~156dp and the floating + / Camera buttons occupy bottom: 96dp up to ~208dp on a ~360dp screen, the unobstructed gap at the top-right is too small unless the header itself scrolls away in landscape mode (matching Mobile Web landscape behavior).

e5ash avatar Nov 07 '26 18:11 e5ash

Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~0179cdc82689f205c7

TassioSales avatar Nov 07 '26 19:11 TassioSales

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

melvin-bot[bot] avatar Nov 07 '26 19:11 melvin-bot[bot]

Proposal

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

On the Android app in landscape orientation, when viewing Insights > Spend Over Time, the floating + button (and FloatingCameraButton above the bottom tab bar) covers the three-dot menu (WidgetHeaderMenu) in the top-right corner of the Spend over time chart card, and scrolling cannot bring the three-dot menu into an unobstructed tappable area.

What is the root cause of that problem?

  1. In src/pages/Insights/InsightsDashboard.tsx (at line 104 inside InsightsDashboardContent and line 290 inside InsightsDashboard), whether the 3-row Insights header (TopBar + InsightsTabSelector + InsightsPageControls, ~156dp tall) stays fixed above <ScrollView> or scrolls away inside <ScrollView> is controlled by useIsMobileWebLandscape():
    // src/pages/Insights/InsightsDashboard.tsx:104 and 290
    const shouldScrollMainHeader = useIsMobileWebLandscape();
    
    And at lines 409 and 436:
    {!shouldScrollMainHeader && header}
    ...
    <InsightsDashboardContent ...>
        {shouldScrollMainHeader && header}
    </InsightsDashboardContent>
    
  2. On Web (src/hooks/useIsMobileWebLandscape/index.ts), useIsMobileWebLandscape() returns useIsInLandscapeMode(), which moves header inside <InsightsDashboardContent>'s <ScrollView> so that scrolling down moves the 156dp header off the top of the screen and brings the Spend over time card header (WidgetHeaderMenu) into the upper half of the viewport, well clear of the floating + button.
  3. On Native (src/hooks/useIsMobileWebLandscape/index.native.ts), useIsMobileWebLandscape() is hardcoded to return false. Consequently, on Android native in landscape (~360dp total viewport height), the ~156dp 3-row Insights header stays pinned at the top while the native bottom tab bar and stacked floating buttons (NativeTabBarOverlay.tsx:59-65, bottom: variables.androidNativeTabBarFloatingButtonsBottom = 96dp, right: 16dp) occupy the bottom-right edge up to the bottom of the pinned header—leaving zero unobstructed vertical space on the right edge for the Spend over time three-dot menu.
  4. Why useIsMobileWebLandscape/index.native.ts was hardcoded to false (and why we must NOT change useIsMobileWebLandscape/index.native.ts globally):
    • useIsMobileWebLandscape() is also used in src/pages/Search/SearchPageNarrow/index.tsx, which passes shouldScrollMainHeader to <ScrollAwayHeaderContainer isEnabled={shouldScrollMainHeader} header={...}>.
    • On native (src/pages/Search/SearchPageNarrow/ScrollAwayHeaderContainer/index.native.tsx), ScrollAwayHeaderContainer is a no-op stub (return <View style={styles.flex1}>{children}</View>;) that ignores the header prop! Changing useIsMobileWebLandscape/index.native.ts globally would cause the entire Search/Spend header to disappear on native landscape.
    • By contrast, InsightsDashboard.tsx does not use ScrollAwayHeaderContainer: it renders {shouldScrollMainHeader && header} directly inside its standard React Native <ScrollView> (lines 194, 220, 436), which works identically on both Web and Native.

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

In src/pages/Insights/InsightsDashboard.tsx, derive shouldScrollMainHeader from useResponsiveLayout() (shouldUseNarrowLayout && isInLandscapeMode) in both InsightsDashboardContent (line 104) and InsightsDashboard (line 290) instead of useIsMobileWebLandscape():

What alternative solutions did you explore? (Optional)

  • Changing src/hooks/useIsMobileWebLandscape/index.native.ts to return useIsInLandscapeMode(): Rejected because SearchPageNarrow relies on useIsMobileWebLandscape() returning false on native (ScrollAwayHeaderContainer/index.native.tsx does not render its header prop). Scoping the change to InsightsDashboard.tsx fixes Insights in native landscape without regressing SearchPageNarrow.
  • Adding horizontal right padding to InsightsChartWidget header or bottom padding to <ScrollView>: Adding right padding to the widget header breaks card header alignment with the chart canvas, and bottom <ScrollView> padding only adds space below the last chart (Top categories), not above the first chart (Spend over time). Allowing the 3-row Insights header to scroll inside <ScrollView> in narrow landscape matches Mobile Web landscape behavior and gives full access to every chart's header controls.

cocvn157 avatar Nov 08 '26 04:11 cocvn157

📣 @cocvn157! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

melvin-bot[bot] avatar Nov 08 '26 04:11 melvin-bot[bot]

@jayeshmangwani Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Nov 09 '26 22:11 melvin-bot[bot]