Skip to content

Expense - No background blur when opening Month/Year RHP when inline editing #88645

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.2.62-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #83127
Email or phone of affected tester (no customers): jnsdijsnodjonjiosjdio@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create two expenses.
  4. Open the report.
  5. Click Date field.
  6. Click Month or Year.

Expected Result:

There will be background blur when opening Month/Year RHP when inline editing.

Actual Result:

There is no background blur when opening Month/Year RHP when inline editing.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Bug7136935_1776975839161.3.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 23, 2026
  2. github-actions commented on Apr 23, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  3. OSBotify commented on Apr 23, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #83127 - "feat: Add inline editing for tables on desktop" by @mohammadjafarinejad (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #83127 introduced the inline editing feature for expense table cells, including the DateCell component that uses DatePickerModal. The missing background blur when opening Month/Year RHP is a direct consequence of this new code path, and the feature does not exist in production. Reverting this PR will remove the regression.

    Assigned: @mohammadjafarinejad (PR author), @ahmedGaber93, @puneetlath (approving reviewers) from highest-confidence causing PR only
    Labels: DeployBlockerCash kept (frontend App PR caused the issue); DeployBlocker not present, no changes made.

    Detailed Analysis

    Evidence

    • The issue reporter references PR feat: Add inline editing for tables on desktop #83127 directly in the issue body as the regression source.
    • The issue is reproducible on staging only — "Reproducible in production? N/A - new feature, doesn't exist in prod." This confirms it was introduced in the current staging deploy.
    • PR feat: Add inline editing for tables on desktop #83127 is listed in the current StagingDeployCash (issue Deploy Checklist: New Expensify 2026-04-23 #88633) checklist.
    • PR feat: Add inline editing for tables on desktop #83127 added DateCell.tsx (src/components/Search/SearchList/ListItem/DateCell.tsx), a new component that renders DatePickerModal inside a popover as part of inline editing for expense table rows.
    • The DatePickerModal renders a CalendarPicker, which contains YearPickerModal and MonthPickerModal. These are RIGHT_DOCKED modals that use shouldUseCustomBackdrop, which renders an Overlay component driven by React Navigation's useCardAnimation. When DatePickerModal is invoked from the new inline editing popover context (rather than a full navigation screen), the background blur for nested Month/Year modals is not produced.

    Verification

    • Affected files: src/components/DatePicker/CalendarPicker/YearPickerModal.tsx, src/components/DatePicker/CalendarPicker/MonthPickerModal.tsx, src/components/Search/SearchList/ListItem/DateCell.tsx
    • PR feat: Add inline editing for tables on desktop #83127 directly adds DateCell.tsx (new file) and modifies DatePickerModal.tsx (adding shouldDisplayBelowModals prop).
    • The Month/Year picker modals (YearPickerModal, MonthPickerModal) have always used shouldUseCustomBackdrop for the blur overlay. The blur regression only occurs in the new inline-editing popover context introduced by feat: Add inline editing for tables on desktop #83127, not in existing non-inline-editing date picker flows.

    Root Cause

    PR #83127 introduced DateCell.tsx which renders DatePickerModal as a popover within an inline editing flow. When a user clicks Month or Year inside the calendar, MonthPickerModal or YearPickerModal is opened as a RIGHT_DOCKED modal with shouldUseCustomBackdrop=true. The Overlay component behind this custom backdrop uses useCardAnimation from React Navigation, which relies on a navigation stack context. In the new inline-editing popover rendering context created by #83127, the navigation animation progress available to Overlay does not produce the expected background blur/dim effect. The blur worked correctly in the pre-existing non-inline-editing flows because those date pickers were opened in a proper navigation context.

  4. ahmedGaber93 commented on Apr 23, 2026

    @ahmedGaber93
    Contributor

    I believe we can disable the opening of Month/Year RHP in the inline edit and instead use the arrow keys.

    Let's get @Expensify/design Thoughts?

  5. trjExpensify commented on Apr 23, 2026

    @trjExpensify
    Contributor

    Mhm, I think we probably just need to blur the background like we do the quick filter date popover. Happy to defer to design though!

  6. shawnborton commented on Apr 24, 2026

    @shawnborton
    Contributor

    Agree, we should add that overlay scrim/background blur here.

  7. trjExpensify commented on Apr 24, 2026

    @trjExpensify
    Contributor

    Cool, @ahmedGaber93 another one to move forward with. 👍

  8. ahmedGaber93 commented on Apr 24, 2026

    @ahmedGaber93
    Contributor

    @mohammadjafarinejad Based on the comment at the end of line here

    // right_docked modals shouldn't add backdrops when opened in same-width RHP 
    

    const backdropOpacityAdjusted =
    hideBackdrop || (type === CONST.MODAL.MODAL_TYPE.RIGHT_DOCKED && !isSmallScreenWidth && (isInNarrowPane || isInNarrowPaneModal)) // right_docked modals shouldn't add backdrops when opened in same-width RHP
    ? 0
    : backdropOpacity;

    The backdrops are disabled when opening on the same RHP to prevent overlapping backdrop opacity (see video below).

    Screen.Recording.2026-04-24.at.9.11.52.PM.mov

    We need to enable it for the current issue while preserving the existing behavior elsewhere. I think the best approach is to introduce a new flag to force-enable it on narrow layouts and pass it down through:

        shouldEnableMonthYearBackdropInNarrowPane={isEditing && !isSearchTopmostFullScreenRoute()}
    

    DatePickerModal > YearPicker / MonthPicker on DateCell component

    code diff
    diff --git a/src/components/DatePicker/CalendarPicker/MonthPickerModal.tsx b/src/components/DatePicker/CalendarPicker/MonthPickerModal.tsx
    index e9273e36307..e12314e00b7 100644
    --- a/src/components/DatePicker/CalendarPicker/MonthPickerModal.tsx
    +++ b/src/components/DatePicker/CalendarPicker/MonthPickerModal.tsx
    @@ -31,9 +31,21 @@ type MonthPickerModalProps = {
     
         /** Function to call when the user closes the month picker */
         onClose?: () => void;
    +
    +    /** Whether RIGHT_DOCKED modal should keep backdrop in narrow pane context */
    +    shouldEnableBackdropInNarrowPane?: boolean;
     };
     
    -function MonthPickerModal({isVisible, currentMonth = new Date().getMonth(), currentYear = new Date().getFullYear(), minDate, maxDate, onMonthChange, onClose}: MonthPickerModalProps) {
    +function MonthPickerModal({
    +    isVisible,
    +    currentMonth = new Date().getMonth(),
    +    currentYear = new Date().getFullYear(),
    +    minDate,
    +    maxDate,
    +    onMonthChange,
    +    onClose,
    +    shouldEnableBackdropInNarrowPane = false,
    +}: MonthPickerModalProps) {
         const styles = useThemeStyles();
         const {translate} = useLocalize();
         const [searchText, setSearchText] = useState('');
    @@ -75,6 +87,7 @@ function MonthPickerModal({isVisible, currentMonth = new Date().getMonth(), curr
                 shouldHandleNavigationBack
                 shouldUseCustomBackdrop
                 onBackdropPress={onClose}
    +            shouldEnableBackdropInNarrowPane={shouldEnableBackdropInNarrowPane}
                 enableEdgeToEdgeBottomSafeAreaPadding
             >
                 <ScreenWrapper
    diff --git a/src/components/DatePicker/CalendarPicker/YearPickerModal.tsx b/src/components/DatePicker/CalendarPicker/YearPickerModal.tsx
    index 26b2909899d..275fb803535 100644
    --- a/src/components/DatePicker/CalendarPicker/YearPickerModal.tsx
    +++ b/src/components/DatePicker/CalendarPicker/YearPickerModal.tsx
    @@ -25,9 +25,12 @@ type YearPickerModalProps = {
     
         /** Function to call when the user closes the year picker */
         onClose?: () => void;
    +
    +    /** Whether RIGHT_DOCKED modal should keep backdrop in narrow pane context */
    +    shouldEnableBackdropInNarrowPane?: boolean;
     };
     
    -function YearPickerModal({isVisible, years, currentYear = new Date().getFullYear(), onYearChange, onClose}: YearPickerModalProps) {
    +function YearPickerModal({isVisible, years, currentYear = new Date().getFullYear(), onYearChange, onClose, shouldEnableBackdropInNarrowPane = false}: YearPickerModalProps) {
         const styles = useThemeStyles();
         const {translate} = useLocalize();
         const [searchText, setSearchText] = useState('');
    @@ -67,6 +70,7 @@ function YearPickerModal({isVisible, years, currentYear = new Date().getFullYear
                 shouldHandleNavigationBack
                 shouldUseCustomBackdrop
                 onBackdropPress={onClose}
    +            shouldEnableBackdropInNarrowPane={shouldEnableBackdropInNarrowPane}
                 enableEdgeToEdgeBottomSafeAreaPadding
             >
                 <ScreenWrapper
    diff --git a/src/components/DatePicker/CalendarPicker/index.tsx b/src/components/DatePicker/CalendarPicker/index.tsx
    index f51e0e54eed..5975d79e016 100644
    --- a/src/components/DatePicker/CalendarPicker/index.tsx
    +++ b/src/components/DatePicker/CalendarPicker/index.tsx
    @@ -58,6 +58,9 @@ type CalendarPickerProps = {
     
         /** Optional style override for the header container */
         headerContainerStyle?: StyleProp<ViewStyle>;
    +
    +    /** Whether Month/Year right-docked picker modals should keep backdrop in narrow pane context */
    +    shouldEnableMonthYearBackdropInNarrowPane?: boolean;
     };
     
     function getInitialCurrentDateView(value: Date | string, minDate: Date, maxDate: Date) {
    @@ -80,6 +83,7 @@ function CalendarPicker({
         DayComponent = Day,
         selectableDates,
         headerContainerStyle,
    +    shouldEnableMonthYearBackdropInNarrowPane = false,
     }: CalendarPickerProps) {
         // eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
         const {isSmallScreenWidth} = useResponsiveLayout();
    @@ -428,6 +432,7 @@ function CalendarPicker({
                     currentYear={currentYearView}
                     onYearChange={onYearSelected}
                     onClose={() => setIsYearPickerVisible(false)}
    +                shouldEnableBackdropInNarrowPane={shouldEnableMonthYearBackdropInNarrowPane}
                 />
                 <MonthPickerModal
                     isVisible={isMonthPickerVisible}
    @@ -437,6 +442,7 @@ function CalendarPicker({
                     maxDate={maxDate}
                     onMonthChange={onMonthSelected}
                     onClose={() => setIsMonthPickerVisible(false)}
    +                shouldEnableBackdropInNarrowPane={shouldEnableMonthYearBackdropInNarrowPane}
                 />
             </View>
         );
    diff --git a/src/components/DatePicker/DatePickerModal.tsx b/src/components/DatePicker/DatePickerModal.tsx
    index b2f01ed67b9..37db2f1190e 100644
    --- a/src/components/DatePicker/DatePickerModal.tsx
    +++ b/src/components/DatePicker/DatePickerModal.tsx
    @@ -37,6 +37,7 @@ function DatePickerModal({
         shouldCloseWhenBrowserNavigationChanged = false,
         shouldPositionFromTop = false,
         forwardedFSClass,
    +    shouldEnableMonthYearBackdropInNarrowPane = false,
     }: DatePickerProps) {
         const [selectedDate, setSelectedDate] = useState(value ?? defaultValue ?? undefined);
         const anchorRef = useRef<View>(null);
    @@ -85,6 +86,7 @@ function DatePickerModal({
                     maxDate={maxDate}
                     value={selectedDate}
                     onSelected={handleDateSelection}
    +                shouldEnableMonthYearBackdropInNarrowPane={shouldEnableMonthYearBackdropInNarrowPane}
                 />
             </PopoverWithMeasuredContent>
         );
    diff --git a/src/components/DatePicker/types.ts b/src/components/DatePicker/types.ts
    index dceffd7f6c1..17ed94e8787 100644
    --- a/src/components/DatePicker/types.ts
    +++ b/src/components/DatePicker/types.ts
    @@ -35,6 +35,12 @@ type DatePickerBaseProps = ForwardedFSClassProps & {
     
         /** ID of the wrapping form */
         formID?: keyof OnyxFormValuesMapping;
    +
    +    /**
    +     * Whether Month/Year right-docked picker modals should keep backdrop in narrow pane context.
    +     * Used by inline editing flows that require background dimming.
    +     */
    +    shouldEnableMonthYearBackdropInNarrowPane?: boolean;
     };
     
     type DatePickerModalProps = DatePickerBaseProps & {
    @@ -103,6 +109,12 @@ type DatePickerProps = {
     
         /** If the popover will be positioned from the top */
         shouldPositionFromTop?: boolean;
    +
    +    /**
    +     * Whether Month/Year right-docked picker modals should keep backdrop in narrow pane context.
    +     * Used by inline editing flows that require background dimming.
    +     */
    +    shouldEnableMonthYearBackdropInNarrowPane?: boolean;
     } & Omit<BaseTextInputProps & PopoverWithMeasuredContentProps, 'anchorRef' | 'children'>;
     
     export type {DatePickerBaseProps, DatePickerModalProps, DateInputWithPickerProps, DatePickerProps};
    diff --git a/src/components/Modal/BaseModal.tsx b/src/components/Modal/BaseModal.tsx
    index 967e5ab7f79..7d3df1e223e 100644
    --- a/src/components/Modal/BaseModal.tsx
    +++ b/src/components/Modal/BaseModal.tsx
    @@ -71,6 +71,7 @@ function BaseModal({
         forwardedFSClass = CONST.FULLSTORY.CLASS.UNMASK,
         ref,
         shouldDisplayBelowModals = false,
    +    shouldEnableBackdropInNarrowPane = false,
         shouldWrapModalChildrenInScrollViewIfBottomDockedInLandscapeMode = true,
     }: BaseModalProps) {
         // When the `enableEdgeToEdgeBottomSafeAreaPadding` prop is explicitly set, we enable edge-to-edge mode.
    @@ -301,8 +302,10 @@ function BaseModal({
         const {originalValues} = useContext(ScreenWrapperOfflineIndicatorContext);
         const offlineIndicatorContextValue = useMemo(() => (isInNarrowPane ? (originalValues ?? {}) : {}), [isInNarrowPane, originalValues]);
     
    +    const shouldSuppressRightDockedBackdrop =
    +        type === CONST.MODAL.MODAL_TYPE.RIGHT_DOCKED && !isSmallScreenWidth && (isInNarrowPane || isInNarrowPaneModal) && !shouldEnableBackdropInNarrowPane;
         const backdropOpacityAdjusted =
    -        hideBackdrop || (type === CONST.MODAL.MODAL_TYPE.RIGHT_DOCKED && !isSmallScreenWidth && (isInNarrowPane || isInNarrowPaneModal)) // right_docked modals shouldn't add backdrops when opened in same-width RHP
    +        hideBackdrop || shouldSuppressRightDockedBackdrop // right_docked modals shouldn't add backdrops when opened in same-width RHP
                 ? 0
                 : backdropOpacity;
     
    diff --git a/src/components/Modal/types.ts b/src/components/Modal/types.ts
    index e13c7b82020..4d0800e1e21 100644
    --- a/src/components/Modal/types.ts
    +++ b/src/components/Modal/types.ts
    @@ -125,6 +125,12 @@ type BaseModalProps = Partial<ReanimatedModalProps> &
              */
             shouldDisplayBelowModals?: boolean;
     
    +        /**
    +         * Whether a RIGHT_DOCKED modal should keep its backdrop when rendered in a narrow pane context.
    +         * Use this only for nested flows that still require visual dimming.
    +         */
    +        shouldEnableBackdropInNarrowPane?: boolean;
    +
             /**
              * Whether the modal should wrap the children in a scroll view if it is a bottom docked modal in landscape mode.
              * Defaults to true.
    diff --git a/src/components/Search/SearchList/ListItem/DateCell.tsx b/src/components/Search/SearchList/ListItem/DateCell.tsx
    index d6e0b2391e1..b63ace8c676 100644
    --- a/src/components/Search/SearchList/ListItem/DateCell.tsx
    +++ b/src/components/Search/SearchList/ListItem/DateCell.tsx
    @@ -5,6 +5,7 @@ import type {EditableProps} from '@components/Table/EditableCell/types';
     import TextWithTooltip from '@components/TextWithTooltip';
     import useThemeStyles from '@hooks/useThemeStyles';
     import DateUtils from '@libs/DateUtils';
    +import isSearchTopmostFullScreenRoute from '@libs/Navigation/helpers/isSearchTopmostFullScreenRoute';
     import CONST from '@src/CONST';
     
     type DateCellProps = {
    @@ -53,6 +54,7 @@ function DateCell({date, showTooltip, isLargeScreenWidth, canEdit, onSave}: Date
                         minDate={CONST.CALENDAR_PICKER.MIN_DATE}
                         maxDate={CONST.CALENDAR_PICKER.MAX_DATE}
                         inputID="EditableDateCell"
    +                    shouldEnableMonthYearBackdropInNarrowPane={isEditing && !isSearchTopmostFullScreenRoute()}
                     />
                 }
             >
    
    
  9. mohammadjafarinejad commented on Apr 24, 2026

    @mohammadjafarinejad
    Contributor
  10. puneetlath commented on Apr 24, 2026

    @puneetlath
    Contributor

    Inline editing reverted.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringHourlyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions