Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/components/SelectionScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import ONYXKEYS from '@src/ONYXKEYS';
import type * as OnyxCommon from '@src/types/onyx/OnyxCommon';
import type {ConnectionName, PolicyFeatureName} from '@src/types/onyx/Policy';
import type {ReceiptErrors} from '@src/types/onyx/Transaction';
import {isEmptyObject} from '@src/types/utils/EmptyObject';
import ErrorMessageRow from './ErrorMessageRow';
import HeaderWithBackButton from './HeaderWithBackButton';
import OfflineWithFeedback from './OfflineWithFeedback';
Expand Down Expand Up @@ -183,7 +182,7 @@ function SelectionScreen<T = string>({
shouldSingleExecuteRowSelect={shouldSingleExecuteRowSelect}
shouldUpdateFocusedIndex={shouldUpdateFocusedIndex}
alternateNumberOfSupportedLines={2}
addBottomSafeAreaPadding={!errors || isEmptyObject(errors)}
addBottomSafeAreaPadding
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Krishna2323 this change isn't the same as what you said here, right? This change looks like what Melvin and misamikasa proposed

@FitseTLT's #84841 (comment) looks good to me!

The original ScreenWrapper had includeSafeAreaPaddingBottom={!!errors && !isEmptyObject(errors)}, which was accidentally inverted to addBottomSafeAreaPadding={!errors || isEmptyObject(errors)} during the edge-to-edge refactor here. Not going with the "always true" approach from other proposals (including Melvin's) since SelectionScreen is used across 65+ pages — we should restore the original intent rather than change behavior for all consumers.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cead22 Yes, that’s correct — it was my mistake. Initially, it seemed like the selected proposal’s RCA was more accurate, since it does point to this PR, which introduced the change.

Later, @FitseTLT investigated the Codex comment and found that it isn’t a valid solution for all cases.

Sorry for the mistake on my end — I just wanted to keep the fix scoped to the original issue.

>
<ErrorMessageRow
errors={errors}
Expand Down
Loading