Project

General

Profile

Actions

Bug #19865

closed

Clicking on item in project view causes search to be wiped

Added by Peter Amstutz over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench2
Target version:
Story points:
2.0
Release relationship:
Auto

Description

Steps to reproduce:

  1. Go to a project with lots of items
  2. Enter something into the search box for that project
  3. Open the right-side panel
  4. Click on an item to see its details in the right hand panel
  5. 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.

Subtasks 1 (0 open1 closed)

Task #19875: Review 19865-search-clearing-fixResolvedLucas Di Pentima12/14/2022Actions
Actions #1

Updated by Peter Amstutz over 1 year ago

  • Description updated (diff)
Actions #2

Updated by Peter Amstutz over 1 year ago

  • Assigned To set to Lisa Knox
  • Description updated (diff)
Actions #3

Updated by Peter Amstutz over 1 year ago

  • Story points set to 2.0
Actions #4

Updated by Peter Amstutz over 1 year ago

  • Assigned To changed from Lisa Knox to Lucas Di Pentima
Actions #5

Updated by Lucas Di Pentima over 1 year ago

  • Status changed from New to In Progress
Actions #6

Updated by Lucas Di Pentima over 1 year ago

Updates at arvados-workbench2|6ed29d15 - branch 19865-search-clearing-fix
Test run: developer-tests-workbench2: #1036

  • Fixes passing selfClearProp property to InputSearch component so that it gets reset only on navigation actions.
Actions #7

Updated by Lucas Di Pentima over 1 year ago

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.

Actions #8

Updated by Lucas Di Pentima over 1 year ago

Updates at arvados-workbench2|861e5ee6
Test run: developer-tests-workbench2: #1040

  • Re-enables communication between DataExplorer and SearchInput to fix the failing test.

...still looking for a way to avoid the double request on route change.

Actions #9

Updated by Lucas Di Pentima over 1 year ago

Updates at arvados-workbench2|30a7fda
Test run: developer-tests-workbench2: #1042

  • Rebases into latest main
  • Adds Cypress test exposing the issue.
  • Passes the current route as an auto-clear prop on the search input component.
Actions #10

Updated by Peter Amstutz over 1 year ago

  • Assigned To changed from Lucas Di Pentima to Stephen Smith
Actions #11

Updated by Peter Amstutz over 1 year ago

  • Target version changed from 2022-12-21 Sprint to 2023-01-18 sprint
Actions #12

Updated by Stephen Smith over 1 year ago

  • 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?

Actions #13

Updated by Peter Amstutz over 1 year ago

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.

Actions #14

Updated by Lucas Di Pentima over 1 year ago

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.
Actions #15

Updated by Peter Amstutz over 1 year ago

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

Actions #16

Updated by Lucas Di Pentima over 1 year ago

  • Status changed from In Progress to Resolved
Actions #17

Updated by Peter Amstutz about 1 year ago

  • Release set to 57
Actions

Also available in: Atom PDF