Make TaskAssigneeSelectorModal use new SelectionListWithSections#81320
Conversation
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] |
| extraData={flattenedData.length} | ||
| getItemType={getItemType} | ||
| initialScrollIndex={initialFocusedIndex} | ||
| initialScrollIndex={initialScrollIndex ?? initialFocusedIndex} |
There was a problem hiding this comment.
So this is a very specific, situation cause initiallyFocusedItem is not in the beginning, but in Recents sections.
To match the behaviour on main I added this prop, to focus the right item but still scroll to the top.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aaa82a5d8e
ℹ️ 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".
| shouldSingleExecuteRowSelect | ||
| onChangeText={setSearchTerm} | ||
| textInputValue={searchTerm} | ||
| headerMessage={headerMessage} | ||
| initiallyFocusedOptionKey={initiallyFocusedOptionKey} | ||
| shouldUpdateFocusedIndex | ||
| textInputLabel={translate('selectionList.nameEmailOrPhoneNumber')} | ||
| textInputOptions={textInputOptions} | ||
| initialScrollIndex={0} | ||
| initiallyFocusedItemKey={initiallyFocusedOptionKey} |
There was a problem hiding this comment.
Preserve initial scroll to selected assignee
Because SelectionListWithSections uses initialScrollIndex ?? initialFocusedIndex for the FlashList’s initial position, hard‑coding initialScrollIndex={0} forces the list to start at the top even when initiallyFocusedItemKey points to the currently selected assignee. When editing a task whose assignee is not in the first section, the modal will open with the selected user off‑screen, making it appear unselected until the user scrolls. Consider omitting initialScrollIndex here so the list opens at the focused/selected item.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This is expected behaviour here and that's why I introduced this new prop
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-02-05.at.10.44.26.movAndroid: mWeb ChromeScreen.Recording.2026-02-05.at.10.36.31.moviOS: HybridAppScreen.Recording.2026-02-05.at.10.43.55.moviOS: mWeb SafariScreen.Recording.2026-02-05.at.10.40.52.movMacOS: Chrome / SafariScreen.Recording.2026-02-05.at.10.35.19.mov |
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/grgia in version: 9.3.13-1 🚀
|
|
🚀 Deployed to staging by https://github.com/grgia in version: 9.3.15-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.15-10 🚀
|
Explanation of Change
Fixed Issues
$ #65658
PROPOSAL:
Tests
+Assign taskAssigneesOffline 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-02-04.at.11.51.28.mov