Make DestinationPicker use new SelectionListWitSections#80335
Make DestinationPicker use new SelectionListWitSections#80335grgia merged 10 commits intoExpensify:mainfrom
DestinationPicker use new SelectionListWitSections#80335Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@dukenv0307 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56d71edc3d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| type: CONST.SECTION_LIST_ITEM_TYPE.ROW, | ||
| isDisabled: section.isDisabled === true || item.isDisabled === true, | ||
| keyForList: `${item.keyForList}#${itemsTotalCount}`, |
There was a problem hiding this comment.
Keep list keys stable when passing selection data
Appending #${itemsTotalCount} to keyForList mutates the item that gets passed to onSelectRow, so consumers that persist destination.keyForList now store a suffixed ID. In the per-diem flow, IOURequestStepDestination.updateDestination sets customUnitRateID from this key, and later lookups like customUnit?.rates?.[selectedDestination] (e.g., in IOURequestStepSubrate) will fail because the policy rates are keyed by the original ID, not the suffixed one. This means selecting a destination can lead to missing subrates or rate data on subsequent steps.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agree, same problem as with EditReportFieldDropdown. I'll think about better way to make them unique
|
@dukenv0307 I think now it should be okay 😊 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-01-26.at.23.17.44.movAndroid: mWeb ChromeScreen.Recording.2026-01-26.at.23.15.11.moviOS: HybridAppScreen.Recording.2026-01-26.at.23.17.13.moviOS: mWeb SafariScreen.Recording.2026-01-26.at.23.14.23.movMacOS: Chrome / SafariScreen.Recording.2026-01-26.at.23.11.18.mov |
| shouldShow: true, | ||
| data, | ||
| indexOffset: data.length, | ||
| sectionIndex: 0, |
There was a problem hiding this comment.
NAB. Can we remove it then use the list index instead?
There was a problem hiding this comment.
I'm not sure if I understand
There was a problem hiding this comment.
I noticed that sectionIndex is being incremented sequentially (0, 1, 2, …) and then used here:
Since the values are sequential, I think we could just use the section index directly instead.
There was a problem hiding this comment.
Doing it sequentially was my initial idea, however after this comment I thought that maybe this approach will be better, more bug-proof
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/grgia in version: 9.3.10-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.10-6 🚀
|
Explanation of Change
Fixed Issues
$ #65658
PROPOSAL:
Tests
Per diemOffline tests
QA Steps
Same as tests
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-01-23.at.15.36.50.mov