App: Workspace names don't update in search results
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
- If needed, create a workspace by clicking the green plus, New workspace
- Hit the search icon in the header and enter the name of the workspace. Notice that the results show the workspace name.
- Open a new incognito window and log into the same account, or log in on a different device
- Click your avatar in the header to open the settings, then click the name of the workspace, General settings
- Add “Updated” to the workspace name and click Save
- Go back to the window with the search results and notice that the updated workspace name is not visible
- In the search box delete one character and add it again to update the search results
- Notice that the update workspace name is visible in the search results
Expected Result:
Any change to the data in the search results should be reflected almost immediately.
Actual Result:
Search result data is only updated when changing the text or when remounting the component or refreshing.
Workaround:
Reopen the search page or change the text to get the latest data.
Platform:
Where is this issue occurring?
- Web
- iOS
- Android
- Desktop App
- Mobile Web
Version Number: v1.2.11-4
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
The search results come from OptionsListUtils.getSearchOptions which is only called when the SearchPage is constructed here and when the search text is updated here.
I think the best solution involves refactoring the search results in a similar manner to what we did recently with the LHN. We should get a list of reportIDs based on the search text, and then each row in the list can create an option object based on the latest Onyx data. We should handle this refactor internally.
https://user-images.githubusercontent.com/26260477/194962067-a418e952-ef83-4ffe-999a-965864f191e3.mp4 Expensify/Expensify Issue URL: Issue reported by: @neil-marcellini Slack conversation:
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 26 (16 by maintainers)
Ok, sounds good. I’m going to re-label to
NewFeatureand un-assign. This feels more like new functionality and doesn’t need the daily urgency of a bug.@isabelastisser , if you and others are reliably able to reproduce this, add the
Demolitionlabel to assign an engineer (I think/hope non-engineers are allowed to now, if not it’ll be very soon)@isabelastisser I have slightly too much on my plate to work on this daily. I think we should keep it daily because of #bug-zero. Please go ahead and assign it to another engineer, either @tgolen if he has time or throw it to the pool. Thanks.
@isabelastisser , per the new BZ process you need to leave yourself assigned, even for internal issues, reassigning 🐱
OK, great! It’s basically just following the same path that I did to optimize the SectionList in the sidebar. It’s a fair amount of work, but if you get to it before I do and you need some pointers, let me know.
On Tue, Oct 11, 2022 at 9:47 AM Neil Marcellini @.***> wrote:
This was about the only thing on my radar which would refactor the search options: https://github.com/Expensify/Expensify/issues/228943
I think that refactoring would solve this issue. However, it is not my highest priority right now, so anyone is free to take it over.