Skip to content
Closed
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion config/eslint/eslint.seatbelt.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@
"../../src/components/MoneyRequestConfirmationListFooter/sections/ReceiptSection.tsx" "@typescript-eslint/no-unsafe-type-assertion" 1
"../../src/components/MoneyRequestHeader.tsx" "no-restricted-imports" 1
"../../src/components/MoneyRequestReportView/MoneyRequestReportTransactionsNavigation.tsx" "@typescript-eslint/no-unsafe-type-assertion" 2
"../../src/components/MoneyRequestReportView/MoneyRequestViewReportFields.tsx" "@typescript-eslint/no-deprecated/MenuItemWithTopDescription" 1
"../../src/components/MoneyRequestReportView/MoneyRequestViewReportFields.tsx" "@typescript-eslint/no-unsafe-type-assertion" 1
"../../src/components/MultifactorAuthentication/components/Modals/createCancelConfirmModal.tsx" "@typescript-eslint/no-deprecated/ConfirmModal" 1
"../../src/components/MultifactorAuthentication/components/OutcomeScreen/OutcomeScreenBase.tsx" "no-restricted-imports" 1
Expand Down Expand Up @@ -308,7 +309,8 @@
"../../src/components/ReceiptHoverZoom/useReceiptHoverZoom.ts" "@typescript-eslint/no-unsafe-type-assertion" 1
"../../src/components/ReimbursementAccountLoadingIndicator.tsx" "no-restricted-imports" 1
"../../src/components/ReportActionAvatars/useReportPreviewSenderID.ts" "@typescript-eslint/no-unsafe-type-assertion" 2
"../../src/components/ReportActionItem/MoneyReportView.tsx" "@typescript-eslint/no-unsafe-type-assertion" 1
"../../src/components/ReportActionItem/MoneyReportView.tsx" "@typescript-eslint/no-deprecated/MenuItemWithTopDescription" 1
"../../src/components/ReportActionItem/MoneyReportView.tsx" "@typescript-eslint/no-unsafe-type-assertion" 2
"../../src/components/ReportActionItem/MoneyRequestReceiptView.tsx" "@typescript-eslint/no-unsafe-type-assertion" 2
"../../src/components/ReportActionItem/MoneyRequestReceiptView.tsx" "react-hooks/set-state-in-effect" 1
"../../src/components/ReportActionItem/MoneyRequestView.tsx" "@typescript-eslint/no-deprecated/MenuItemWithTopDescription" 5
Expand Down Expand Up @@ -955,6 +957,7 @@
"../../src/pages/domain/Members/DomainMembersPage.tsx" "no-restricted-imports" 1
"../../src/pages/domain/Members/MoveUserBetweenGroupsPage.tsx" "no-restricted-imports" 1
"../../src/pages/domain/Members/MoveUsersBetweenGroupsPage.tsx" "no-restricted-imports" 1
"../../src/pages/DynamicEditReportFieldPage.tsx" "@typescript-eslint/no-unsafe-type-assertion" 1
"../../src/pages/DynamicEditReportFieldPage.tsx" "no-restricted-imports" 1
"../../src/pages/DynamicFlagCommentPage.tsx" "@typescript-eslint/no-deprecated/MenuItem" 1
"../../src/pages/DynamicFlagCommentPage.tsx" "no-restricted-imports" 1
Expand Down
7 changes: 0 additions & 7 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7707,12 +7707,6 @@ const CONST = {

REPORT_FIELD_TITLE_FIELD_ID: 'text_title',

/** How many report fields are shown side by side in the report view on a wide layout */
REPORT_FIELDS_PER_ROW: 3,

/** Below this many options, a report field list is short enough to scan without a search input */
REPORT_FIELD_LIST_SEARCH_THRESHOLD: 8,

MOBILE_PAGINATION_SIZE: 15,
WEB_PAGINATION_SIZE: 30,

Expand Down Expand Up @@ -10064,7 +10058,6 @@ const CONST = {
MODERATION_BUTTON: 'Report-ModerationButton',
MONEY_REQUEST_REPORT_ACTIONS_LIST_SELECT_ALL: 'MoneyRequestReportActionsList-SelectAll',
MONEY_REQUEST_REPORT_TRANSACTION_ITEM: 'MoneyRequestReportTransactionItem',
REPORT_FIELD_DELETE_BUTTON: 'Report-ReportFieldDeleteButton',
REPORT_ACTION_AVATAR: 'Report-ReportActionAvatar',
PARTICIPANTS_ROW: 'Report-ParticipantsRow',
ROOM_MEMBERS_ROW: 'Report-RoomMembersRow',
Expand Down
12 changes: 3 additions & 9 deletions src/components/DatePicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,10 @@ function DatePicker({
forwardedFSClass,
shouldDeferShowUntilPositioned = false,
shouldDismissKeyboardBeforeShow = false,
wrapperStyle,
rightHandSideComponent,
onPickerVisibilityChange,
shouldHideCalendarIcon = false,
icon,
shouldEnableMonthYearBackdropInNarrowPane = false,
textInputContainerStyles,
}: DateInputWithPickerProps) {
const icons = useMemoizedLazyExpensifyIcons(['Calendar']);
const styles = useThemeStyles();
Expand Down Expand Up @@ -228,15 +225,13 @@ function DatePicker({
<>
<View
ref={anchorRef}
style={[styles.mv2, wrapperStyle]}
style={styles.mv2}
>
<TextInput
ref={combinedTextInputRef}
inputID={inputID}
forceActiveLabel
// The icon, the clear button and any `rightHandSideComponent` share the right-hand slot. The icon
// gives way when the caller asks for the slot outright, or to a clear button that will actually render.
icon={shouldHideCalendarIcon || (selectedDate && !shouldHideClearButton) ? null : (icon ?? icons.Calendar)}
icon={selectedDate || shouldHideCalendarIcon ? null : (icon ?? icons.Calendar)}
iconContainerStyle={styles.pr0}
label={label}
accessibilityLabel={label}
Expand All @@ -251,7 +246,7 @@ function DatePicker({
onPress={shouldDismissKeyboardBeforeShow ? handlePress : () => showDatePickerModal()}
onSubmitEditing={() => showDatePickerModal()}
onKeyPress={handleInputKeyPress}
textInputContainerStyles={[textInputContainerStyles, isModalVisible && styles.borderColorFocus]}
textInputContainerStyles={isModalVisible ? styles.borderColorFocus : {}}
shouldHideClearButton={shouldHideClearButton}
onClearInput={handleClear}
clearButtonStyle={[styles.mh0, {paddingHorizontal: iconPaddingHorizontal}]}
Expand All @@ -275,7 +270,6 @@ function DatePicker({
shouldPositionFromTop={!isInverted}
forwardedFSClass={forwardedFSClass}
shouldCloseWhenBrowserNavigationChanged
shouldEnableMonthYearBackdropInNarrowPane={shouldEnableMonthYearBackdropInNarrowPane}
/>
</>
);
Expand Down
9 changes: 0 additions & 9 deletions src/components/DatePicker/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import type {ForwardedFSClassProps} from '@libs/Fullstory/types';

import type {OnyxFormValuesMapping} from '@src/ONYXKEYS';

import type {StyleProp, ViewStyle} from 'react-native';

type DatePickerBaseProps = ForwardedFSClassProps & {
/** The selected date as a `yyyy-MM-dd` string, read with DateUtils.parseCalendarDate. `onInputChange` is called with the picked date in the same format. */
value?: string;
Expand Down Expand Up @@ -66,13 +64,6 @@ type DateInputWithPickerProps = DatePickerBaseProps &
*/
shouldDismissKeyboardBeforeShow?: boolean;

/**
* Style for the view that wraps the input and anchors the calendar. It carries a vertical margin by default,
* which a caller laying the field out itself can override, for example to line the input up with a plain
* `TextInput` beside it.
*/
wrapperStyle?: StyleProp<ViewStyle>;

/**
* Reports whether the calendar is open. Opening the picker blurs the input, so this is the signal for "the
* user is on this field" rather than `onFocus`, and it is what drives the input's focused border.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,7 @@ function MoneyRequestReportActionsListContent({reportIDFromRoute, onLayout}: Mon
onViewableItemsChanged={onViewableItemsChanged}
onEndReached={onEndReached}
onStartReached={onStartReached}
// 20px between the report header and the first row of content, which is the report field inputs when the report has fields.
contentContainerStyle={[styles.pt5, shouldReserveBulkActionBarSpace && styles.bulkActionBarListSpacing]}
contentContainerStyle={[shouldUseNarrowLayout ? styles.pt4 : styles.pt3, shouldReserveBulkActionBarSpace && styles.bulkActionBarListSpacing]}
isLoadingInitialActions={isInitialReportLoadPending}
/* This list is not inverted, so the footer is the bottom of the message feed —
the same position the indicator occupies in the inverted ReportActionsList. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ function MoneyRequestReportEmptyStateView({report, policy, onLayout}: MoneyReque
const styles = useThemeStyles();

return (
// `pt5` matches the 20px the unified list puts between the report header and its first row.
// `handled` lets a tap on another report field or a dropdown's clear button land while the keyboard is open, matching the unified list.
<ScrollView
contentContainerStyle={[styles.flexGrow1, styles.pt5]}
keyboardShouldPersistTaps="handled"
>
<ScrollView contentContainerStyle={styles.flexGrow1}>
<MoneyRequestViewReportFields
report={report}
policy={policy}
Expand Down
Loading
Loading