Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear the builtin location filter after 'search this area' searches #819

Merged
merged 1 commit into from
Jun 7, 2021

Conversation

cea2aj
Copy link
Member

@cea2aj cea2aj commented Jun 7, 2021

Clear the builtin location filter after 'search this area' searches so that the filter isn't applied on subsequent requests

This behavior caused an issue in a techops because builtin location filters override NLP location filters from queries. This would sometimes lead to no results or incorrect results if a user searched for a specific location after dragging the map or clicking the 'search this area' button.

J=TECHOPS-650
TEST=manual

View the network tab and confirm that the builtin filter is only applied during 'search this area' searches. Test that using the search bar to find results near a specific location works. Product also tested this change.

@tmeyer2115 tmeyer2115 self-requested a review June 7, 2021 17:16
@cea2aj cea2aj merged commit f8ec0c9 into hotfix/v1.21.1 Jun 7, 2021
@cea2aj cea2aj deleted the dev/search-this-area-fix branch June 7, 2021 17:23
@cea2aj cea2aj mentioned this pull request Jun 7, 2021
cea2aj added a commit that referenced this pull request Jun 7, 2021
### Bugfixes
- Fix a race condition on the full page map (#786)
- Fixed a bug on the full page map where NLP filters in the search query would not work properly after a 'Search this Area' search was performed (#819)
nmanu1 added a commit that referenced this pull request Apr 11, 2024
This PR updates the vertical full page map so that location static filters applied when searching on map move (or Search This Area) are not automatically cleared immediately after conducting the search. We need this filter to remain present if users paginate to the next set of results so that they don't see different (or no) results on the next page. The corresponding techops shows an example of this. But, we do want the filter to be removed if a new search is conducted (see PR #819 where the removal behavior was initially added). So, this is now done when a query update is detected as long as it wasn't triggered from pagination (i.e. a new search is conducted by clicking the Search button, typing Enter in the search bar, clearing the search bar using the X button, or adding/removing a static filter or facet). For map interactions that trigger a new search, the static filter removal is already handled because we set a new static filter for the new map location that replaces the previous one.

Note: it's still possible to get into a bad state via browser navigation (back/forward/refresh) because we don't properly respect the location filter in the URL. This will be fixed in a separate [item](https://yexttest.atlassian.net/browse/WAT-3958).

J=TECHOPS-11475
TEST=manual

Tested these changes on the site in the techops as well as our test site and saw that a search with an NLP location filter can be conducted as expected both before and after any map interactions that apply a static location filter. Pagination after a map interaction no longer drops the static location filter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants