cedardevs / feedback

An issue-only repository for centralizing all external feedback
0 stars 0 forks source link

Deleting filter after query term cleared causes the filter removed #8

Closed chris-noaa-affiliate closed 4 years ago

chris-noaa-affiliate commented 5 years ago

Describe the bug

Clearing the query term from the OneStop search UI and then deleting the filter (in this example the keyword filter) returns No Results without the keywords on the left being reset. Note, this is only an issue when the last filter is deleted. This behavior happens for any of the types of filters. If there are 2 or more filters applied to a search deleting one of the filters with the query term cleared executes successfully.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://data.noaa.gov/onestop/collections?q=climate&f=science:Climate%20Indicators%20>%20Atmospheric%2FOcean%20Indicators%20>%20Sea%20Surface%20Temperature%20Indices%20>%20Oceanic%20Nino%20Index

  2. Click on X to remove the "climate" query term and then click on the X to remove the "Oceanic Nino Index" keyword filter.

  3. Expand the keyword > Data Theme > Climate Indicators > Atmospheric/Ocean Indicators > Sea Surface Temperature Indices > Ocean Nino Index

  4. The Ocean Nino Index keyword shows 1 record while the search results show No Results

Expected behavior The keywords should have been reset.

Screenshots I've attached a few screenshots showing the behavior with deleting one of 2 filters and then deleting the last filter after the query term is cleared.

one-filter-with-query-cleared one-filter-with-filter-deleted-after-query-cleared two-filters-with-query-cleared two-filters-with-one-deleted-after-query-cleared

Desktop (please complete the following information):

Additional context Although you can't can't execute a filter using keywords without first searching using a query term in the OneStop UI, you can use a keyword filter without a query term using the OneStop API. The following search works to filter for records with the Oceanic Nino Index keyword.

https://data.noaa.gov/onestop/collections?f=science:Climate%20Indicators%20>%20Atmospheric%2FOcean%20Indicators%20>%20Sea%20Surface%20Temperature%20Indices%20>%20Oceanic%20Nino%20Index

zebdelk commented 4 years ago

This has been fixed in the latest release of OneStop. I just confirmed that it's working correctly in version 2.3.0.