project-lux / lux-frontend

Web front end of LUX
Apache License 2.0
3 stars 0 forks source link

Estimates do not display in Simple Search when coming from Advanced Search. #298

Closed roamye closed 1 week ago

roamye commented 3 months ago

Problem Description: When a user creates a simple search and goes to Advanced Search the number of records displays correctly within its tab. However if you switch to/go back to simple search this number no longer displays. Instead it displays the tab name + (-). For example: Objects (-)

Expected Behavior/Solution: When a user switches to simple search from advanced search, the estimates should reflect the advanced search estimates as the other tabs should not have results. When a user then navigates to a different tab, an information alert will display a message telling the user to perform a new simple search to search under the current tab.

Requirements:

Needed for promotion: If an item on the list is not needed, it should be crossed off but not removed.

UAT/LUX Examples: *AS and AS to SS examples will have matching tab counts once deployed.

Dependencies/Blocks:

Related Github Issues:

Related links:

Wireframe/Mockup: Current: image

Updated: image

image

prowns commented 3 months ago

Discussion from ticket forming... Should revert to the last previous search tab state.

kamerynB commented 1 month ago

I have discovered some interesting functionality. Outlined below are 3 scenarios and their current and expected behavior.

NOTE: All scenarios should take place in the Objects search.

Scenario 1:

  1. Submit a simple search for "andy warhol"
  2. Switch to advanced search
  3. Do NOT submit a new advanced search
  4. Switch back to simple search Current behavior:
    • Since no search was submitted, the results from the previous simple search are valid.
    • The estimates all show as (-) Expected behavior:
    • The estimates should show the previous estimates state from the simple search.

Scenario 2:

  1. Submit a simple search for "andy warhol"
  2. Switch to advanced search
  3. Select "Add Row"
  4. Select Anywhere from the single field dropdown
  5. Add "painting" to the input for Anywhere
  6. Submit the advanced search
  7. Switch back to simple search Current behavior:
    • The results from the submitted advanced search are valid across tabs since it uses a search term shared by all scopes/tabs.
    • The estimates all show as (-) Expected behavior:
    • The estimates should show the previous estimates state from the advanced search.

Scenario 3:

  1. Submit a simple search for "andy warhol"
  2. Switch to advanced search
  3. Select "Add Row"
  4. Select Dimension from the single field dropdown
  5. Select less than from the comparator dropdown
  6. Add "10" to the input for Dimension
  7. Submit the advanced search
  8. Switch back to simple search Current behavior:
    • The results from the submitted advanced search are NOT valid across tabs since it does NOT use a search term shared by all scopes/tabs.
    • Switching to a different tab will show a search error saying the search term is not supported by the scope.
    • The estimates all show as (-) Expected behavior:
    • The search should not be resubmitted across tabs.
    • Valid estimates should show for the tab where the search was submitted but not for the other tabs.

@jffcamp @roamye @dcheather @prowns Please advise on how the frontend should behave in the above scenarios and if anything is incorrect. I'm bringing this to everyone's attention since it is impacting how I should move forward on this issue.

jffcamp commented 1 month ago

@kamerynB - I agree with 1 & 2. For 3 can the trip back to simple search provide a message to alert the user that x terms will be dropped because it isn't available with Simple Search?

roamye commented 1 month ago

@kamerynB -

Scenario 1: the expected behavior is: The estimates should show the previous estimates state from the simple search. Question - does this imply the previous estimates across all tabs or just the tab which it was previously on? (ex: displaying the previous estimate on the Object tab only)

Scenario 2: I have the same question from scenario 1, but I am assuming in scenario 2 we would only want to display the previous estimate of the tab the AS was submitted on.

Scenario 3: I think this ok with an error message somewhere to indicate this will happen.

We can continue discussing later in a meeting.

roamye commented 1 month ago

From Meeting 9/18: *behavior reflected against all test environments

When a user switches back to simple search the FE is making a new search for each tab as it recognizes it as a simple search. Q: We tell the user that when they switch back to simple search all the info will be lost. As a user we would hope to not see the result.

In either scenario (2&3) should we result to its default simple search that they had before? or do we maintain what they had for their advanced search and make sure the results do not come with the error? -> switching to a new tab will show a new blank simple search when switching from AS back to SS. -> error message for going back to simple search needs to be updated. As the message is not clear as you are not losing all input.

Next Steps:

kamerynB commented 1 month ago

@roamye @jffcamp @prowns

Scenarios 2 & 3 Steps and Expected Behavior:

  1. Submit a simple search for "andy warhol"
  2. Switch to advanced search
  3. Select Add Row
  4. Select Dimension from the single field dropdown
  5. Select less than from the comparator dropdown
  6. Add "10" to the input for Dimension
  7. Select Add Row
  8. Select Anywhere from the single field dropdown
  9. Add "painting" to the input for Anywhere
  10. Submit the advanced search
  11. Switch back to the simple search
    • User should see the estimates show as the last submitted search for that given results page (in this case, Objects) and no estimates for other tabs ((-))
      1. Select "Works" tab
    • The works results will not render anything as the last submitted search was an advanced search in the Objects tab and does not apply to other results tabs. See screenshots below.
Screenshot 2024-09-18 at 4 06 01 PM Screenshot 2024-09-18 at 4 06 25 PM
prowns commented 1 month ago

I don't love the blank screen, but if that's the best solution, I'm ok with it. What will the pop-up warning say? Could there also be a message here in the white space inviting users to enter a new search. It's pretty hostile.

roamye commented 1 month ago

@kamerynB - Might be out of scope, but to keep consistency, if the user goes back to an AS (from the blank screen) should the AS also be blank? Currently it still shows the AS query used in objects in the AS Works tab.

Based on our previous discussion the mockup looks good. But @prowns does bring up a good point.

jffcamp commented 1 month ago

I am ok with this but agree that if we can add a message to the blank grey screen that would be better. If that is problematic I'm fine with that being a standalone ticket.

kamerynB commented 1 month ago

@roamye @jffcamp @prowns I can address all the concerns. This ticket is more involved and will take some minor refactoring I believe. I will be pushing it to the next milestone.

roamye commented 3 weeks ago

IT Team Meeting 10/4:

roamye commented 2 weeks ago

Approved by UAT

roamye commented 1 week ago

Looks good in PROD. Closing.