-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix: Cannot navigate duplicated expenses via arrow keys #78857
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?
Fix: Cannot navigate duplicated expenses via arrow keys #78857
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@JS00001 Regarding the suggestion to use a derived value here, I’m a bit hesitant because the logic itself is simple, it isn’t truly “pure” because TRANSACTION_THREAD_NAVIGATION_TRANSACTION_IDS depends on the currently active expense report. Because of that, I don’t think a derived value is the best fit in this case following our data management guidelines: https://github.com/cretadn22/App/blob/13338e2a686b074744f16f58660cf090924b4902/contributingGuides/philosophies/ONYX-DATA-MANAGEMENT.md?plain=1#L88 I’d love to hear your thoughts and discuss this further |
|
@cretadn22 I agree with you. I originally thought that the proposal suggested something along the lines of const [state, setState] = useState()
useEffect(() => {
setState(...)
}, [])I didnt see that |
JS00001
left a comment
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.
Code LGTM, will wait on @jjcoffee 's review before merging
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid-app-2026-01-06_16.15.21.mp4Android: mWeb Chromeandroid-chrome-2026-01-06_16.18.19.mp4iOS: HybridAppios-app-2026-01-06_15.56.30.mp4iOS: mWeb Safariios-safari-2026-01-06_16.00.27.mp4MacOS: Chrome / Safaridesktop-chrome-2026-01-06_15.29.23.mp4 |
|
desktop-chrome-2026-01-06_15.24.50.mp4 |
|
@jjcoffee The transaction list is currently ordered by creation time (it looks like we have support for multiple sorting options, but they’re not working at the moment). Given that, should we always order transactions by creation time, consistent with the Review Duplicates page?
|
|
@cretadn22 I would say we need to follow the way they are ordered in App/src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx Lines 267 to 273 in c909b33
App/src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx Lines 294 to 299 in c909b33
I think I misunderstood your proposal, as I thought you would be updating the transaction list from |
|
@jjcoffee I updated with your suggestion |
|
Nice, thanks! Would you be able to apply the fix for the Here's the flow:
|
| }, [groupedTransactions, sortedTransactions, shouldShowGroupedTransactions]); | ||
|
|
||
| useEffect(() => { | ||
| setActiveTransactionIDs(visualOrderTransactionIDs); |
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.
Is it worth limiting this based on the focusedRoute, so we only update when the RHP is open to avoid performance issues?
|
Note I'll be OOO for a few days, back on the 16th. |
Explanation of Change
Fixed Issues
$ #77286
PROPOSAL: #77286 (comment)
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-01-06.at.18.58.14.mov
Android: mWeb Chrome
Screen.Recording.2026-01-06.at.18.56.44.mov
iOS: Native
Screen.Recording.2026-01-06.at.18.56.00.mov
iOS: mWeb Safari
Screen.Recording.2026-01-06.at.18.54.26.mov
MacOS: Chrome / Safari
Screen.Recording.2026-01-06.at.00.24.13.mov