-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Fix: Exports list is not scrollable when export options exceed viewport height #85104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
ecc0cfe
af8f179
87eef76
95b0b2a
e58a017
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -306,6 +306,10 @@ | |
| }); | ||
| }, [originalSelectedTransactionsOptions, dismissedRejectUseExplanation, isDelegateAccessRestricted, showDelegateNoAccessModal]); | ||
|
|
||
| const shouldPopoverUseScrollView = | ||
|
||
| selectedTransactionsOptions.length >= CONST.DROPDOWN_SCROLL_THRESHOLD || | ||
| selectedTransactionsOptions.some((option) => (option.subMenuItems?.length ?? 0) >= CONST.DROPDOWN_SCROLL_THRESHOLD); | ||
|
|
||
| const dismissRejectModalBasedOnAction = useCallback(() => { | ||
| if (rejectModalAction === CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.REJECT_BULK) { | ||
| dismissRejectUseExplanation(); | ||
|
|
@@ -740,7 +744,7 @@ | |
| reportScrollManager.scrollToEnd(); | ||
| readActionSkipped.current = false; | ||
| readNewestAction(report.reportID, !!reportMetadata?.hasOnceLoadedReportActions); | ||
| }, [setIsFloatingMessageCounterVisible, hasNewestReportAction, reportScrollManager, report.reportID, reportMetadata?.hasOnceLoadedReportActions]); | ||
|
Check warning on line 747 in src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx
|
||
|
|
||
| const scrollToNewTransaction = useCallback( | ||
| (pageY: number) => { | ||
|
|
@@ -800,6 +804,7 @@ | |
| customText={translate('workspace.common.selected', {count: selectedTransactionIDs.length})} | ||
| isSplitButton={false} | ||
| shouldAlwaysShowDropdownMenu | ||
| shouldPopoverUseScrollView={shouldPopoverUseScrollView} | ||
| wrapperStyle={[styles.w100, styles.ph5]} | ||
| /> | ||
| <View style={[styles.alignItemsCenter, styles.userSelectNone, styles.flexRow, styles.pt6, styles.ph8, styles.pb3]}> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ CONSISTENCY-3 (docs)
The
shouldPopoverUseScrollViewcomputation logic is now duplicated in 4 places across the codebase:SettlementButton/index.tsx,SearchBulkActionsButton.tsx,MoneyReportHeader.tsx, andMoneyRequestReportActionsList.tsx. All four perform the identical pattern:Extract this into a shared utility function, for example:
Then use it in all four call sites:
Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.