Skip to content

search: Fix user settings overwriting search parameters from URL

Administrator requested to merge fkling/33435-patterntype-from-url into main

Created by: fkling

Fixes: #33435 (closed)

The logic to load search parameters from user settings only accounted for search parameters passed as actual URL parameters, not as part of the search query.

This PR changes the approach and moves the responsibility of correctly applying the settings from the user settings loading code to the query state store.

I'm also removing the default values from the settings helper methods since I'm not a fan of sprinkling the default values across the code base and it aligns better with my expectations for these functions (no settings, not value). But I'm OK adding it back if we want those functions to always return a valid value.

Test plan

New unit tests.

App preview:

Merge request reports

Loading