Wp-calypso: InlineHelp: Support search doesn't retain search result between Home and FAB instances

Created on 22 Jun 2020  路  6Comments  路  Source: Automattic/wp-calypso

There are x2 support search instances in Calypso.

  1. The "Get help" card on the My Home page.
  2. The "FAB" popover ("?" icon in bottom right of screen).

If you enter a search into the "My Home" version and then switch to another Page and open the "FAB" version the search query is retained but the search results are not persisted.

We should ensure that if there are results for the current query, then same results should be shown between instances.

This is as per @jancavan's feedback.

Whatever the outcome we should update the e2e tests to cover the scenario.

Steps to reproduce

  1. Starting at URL: http://calypso.localhost:3000/pages/{YOURTESTSITE}
  2. Go to the "My Home" page.
  3. See the "Get help" support search and enter a query for Podcast. Wait for results to load.
  4. Navigate to the Pages page (or any other page that is not "My Home").
  5. Toggle the FAB open.
  6. See different results shown.

What I expected

The search UI should contain the query from the "other" instance and the results should be the same.

No additional search query should be fired off.

What happened instead

The results were different for the same query.

cc @retrofox

Design Needed [Type] Bug

Most helpful comment

Interested in your perspective here. Is this a bug or a feature?

This is a bug because the results are different.

I type in domain in Customer Home:

Screen Shot 2020-06-22 at 2 55 12 PM

I navigate to a different page, open up the FAB, and get different results (default links):

Screen Shot 2020-06-22 at 2 55 19 PM

If I click on the search box within the FAB and press enter, nothing happens. I have to clear my query first to get relevant results.

I don't think we should reset the query, but we should offer continuity instead.

@getdave @retrofox

All 6 comments

@getdave I can't reproduce this bug. Although it records the event, it happens when the popover opens (calypso_inlinehelp_show) which is correct.
Also, not totally sure about resetting the query. Issue or Feature?

@jancavan Interested in your perspective here. Is this a bug or a feature?

Interested in your perspective here. Is this a bug or a feature?

This is a bug because the results are different.

I type in domain in Customer Home:

Screen Shot 2020-06-22 at 2 55 12 PM

I navigate to a different page, open up the FAB, and get different results (default links):

Screen Shot 2020-06-22 at 2 55 19 PM

If I click on the search box within the FAB and press enter, nothing happens. I have to clear my query first to get relevant results.

I don't think we should reset the query, but we should offer continuity instead.

@getdave @retrofox

Thanks, Jan.

This is a bug because the results are different.

:this: is a winner.

I don't think we should reset the query, but we should offer continuity instead.

The thing is the state retains the query but doesn't retain the search results. Making the results persistent will fix the issue.

Updated in response to @jancavan's feedback.

I noticed this other bug in the Customer Home Help card. To repro:

  1. Type in a query
  2. Click on one of the results (modal appears)
  3. Close the modal
  4. Click on the search field
  5. Press enter

I was expecting it to do another search, albeit only repopulating the same results (since I did not change the query). But instead, it opened up the modal from the item I previously clicked. It's stuck on the focus state.

Was this page helpful?
0 / 5 - 0 ratings