Repository navigation
Add search bar to Rillet pages - #96528
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f64677fa1
ℹ️ 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".
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-07-22.at.16.01.33.movAndroid: mWeb ChromeiOS: HybridAppScreen.Recording.2026-07-22.at.16.00.34.moviOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-07-22.at.15.55.23.mov |
|
@MelvinBot The logic introduced in this PR is quite similar across multiple pages. Could we consider extracting it into a shared hook to reduce duplication and make it easier to maintain? |
|
Agreed — this is a good candidate for extraction. All 7 Rillet pages repeat the exact same three-line block, differing only in the item type: const filterData = (item, searchInput) => tokenizedSearch([item], searchInput, () => [item.text ?? '', item.value]).length > 0;
const [searchValue, setSearchValue, filteredData] = useSearchResults(data, filterData);
const textInputOptions = {
label: data.length >= CONST.STANDARD_LIST_ITEM_LIMIT ? translate('common.search') : undefined,
value: searchValue,
onChangeText: setSearchValue,
};Since every page's list item is function useSelectionListSearch<T extends ListItem & {value: string}>(data: T[]) {
const {translate} = useLocalize();
const filterData = useCallback((item: T, searchInput: string) => tokenizedSearch([item], searchInput, () => [item.text ?? '', item.value]).length > 0, []);
const [searchValue, setSearchValue, filteredData] = useSearchResults(data, filterData);
const textInputOptions = {
label: data.length >= CONST.STANDARD_LIST_ITEM_LIMIT ? translate('common.search') : undefined,
value: searchValue,
onChangeText: setSearchValue,
};
return {filteredData, textInputOptions};
}Each page then becomes one line: const {filteredData, textInputOptions} = useSelectionListSearch(data);
// ...
data={filteredData}
textInputOptions={textInputOptions}That removes ~6 duplicated lines from each of the 7 files and keeps the Two things to decide when doing it:
|
|
@s77rt Could you check the above suggestion? |
|
Good call! Updated! |
|
@s77rt Coud you resolve:
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c19208a88f
ℹ️ 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".
|
Should be fixed now |
|
🚧 lakchote has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/lakchote in version: 9.4.44-0 🚀
|
|
🤖 I reviewed the changes in this PR against Expensify's help site files under No help site changes are required. This PR adds a search bar to the Rillet accounting selector pages (Company card account, Bill payment account, etc.), appearing when a list has ≥ 12 items. This is a standard in-app usability enhancement to existing selection lists — it doesn't change any documented feature, workflow, or user-facing behavior that the help site describes. I searched Given that, I did not create a draft docs PR. If you'd like a docs update anyway (e.g., you expect a public Rillet setup article to be authored soon that should mention this), let me know and I'll draft one. @s77rt, please confirm you agree no help site changes are needed here. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.4.44-6 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Added search bar to Rillet pages
Fixed Issues
$ #95018
PROPOSAL:
Tests
Screen.Recording.2026-07-20.at.10.28.06.PM.mov
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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