Bug #19865
closed
Clicking on item in project view causes search to be wiped
Added by Peter Amstutz about 2 years ago.
Updated almost 2 years ago.
Release relationship:
Auto
Description
Steps to reproduce:
- Go to a project with lots of items
- Enter something into the search box for that project
- Open the right-side panel
- Click on an item to see its details in the right hand panel
- The search box will be cleared and the full project view reloaded, which is very annoying.
From discussion:
- When the user performs a navigation action (loads a new project, loads a panel for another object type) it should clear the search.
- Clicking on the table row to select it in order to populate the right hand details panel should not clear the search.
- Description updated (diff)
- Assigned To set to Lisa Knox
- Description updated (diff)
- Assigned To changed from Lisa Knox to Lucas Di Pentima
- Status changed from New to In Progress
Updates at arvados-workbench2|3f3ea67a
Test run: developer-tests-workbench2: #1037
- Improves the way the search box is reset on route changes.
There's a pending minor issue: I haven't been able to avoid making a double request (with/without a search term) when navigating from a parent project to a child project. I tried to reset the search input component from the outside so that the middleware would have the correct reset search term (empty string) just before loading the new content. Still, I have yet to make it work.
- Assigned To changed from Lucas Di Pentima to Stephen Smith
- Target version changed from 2022-12-21 Sprint to 2023-01-18 sprint
- Assigned To changed from Stephen Smith to Lucas Di Pentima
Regarding the double request - from what I can tell, the project panel middleware's requestItems gets triggered once by the navigation action which calls down through openProjectPanel in project panel actions and then to the data explorer middleware, the second request is triggered by the search input changing which triggers requestItems through the data explorer middleware.
The tricky part to me is that where these 2 paths diverge going up the stack is in dispatched actions which seem kind of opaque - I'm not sure how I could safely suppress one of these calls, and if I did, it seems like not triggering requestItems on a route change might lead to breakage. The first request triggered by route change code seems to happen before the search is cleared which is why it has the old search value, but the double request happens regardless of whether or not there is a value in search.
Maybe Lucas has some ideas?
What if the filtering state, instead of being part of the search box state, was actually incorporated into the navigation as a query parameter? We do this for advanced search, we could do something similar with project views. Then updating the filter box would be a single navigation action that either reloads the current view or loads a new view, in either case with the filter parameter directly included.
Rebased into latest main
at arvados-workbench2|60a63bb
Test run: developer-tests-workbench2: #1057
- Removes the use of
selfClearProp
property on the InputSearch
component so that it doesn't make unnecessary requests.
- Adds search value action to
DataExplorer
.
- Makes every
loadXXXPanel()
action to call it before calling REQUEST_ITEMS()
so that the initial query already has the search term cleared.
Lucas Di Pentima wrote in #note-14:
Rebased into latest main
at arvados-workbench2|60a63bb
Test run: developer-tests-workbench2: #1057
- Removes the use of
selfClearProp
property on the InputSearch
component so that it doesn't make unnecessary requests.
- Adds search value action to
DataExplorer
.
- Makes every
loadXXXPanel()
action to call it before calling REQUEST_ITEMS()
so that the initial query already has the search term cleared.
This LGTM
- Status changed from In Progress to Resolved
Also available in: Atom
PDF