Skip to content

Global Search - Fix reset filters button

Zack Cuddy requested to merge 343281-reset-filters-disappearing into master

What does this MR do and why?

Fixes #343281 (closed)

This change fixes a bug where the Reset filters button is hidden when it shouldn't be. This is because we are looking at the current query object to determine if we should hide the button. The issue is that the query object is manipulated by the user before it is submitted to the server.

We also store the urlQuery in the Vuex store which is a static property that represents the active query in the URL. When comparing against this we can be sure there are or are not any active sidebar queries active.

Screenshots or screen recordings

Bug Fix
Bug Fix

How to set up and validate locally

  1. Navigate to the Global Search page (ex. http://127.0.0.1:3000/search)
  2. Search for a term and switch scope to Issues(ex. Voluptas quod)
  3. Adjust your status and/or confidentiality filter and click Apply
  4. Note the Reset filters is visible
  5. Adjust your status and confidentiality filter back to "All"
  6. Note the Reset filters button is still visible (This is the fix).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #343281 (closed)

Edited by Andrew Fontaine

Merge request reports

Loading