Skip to content

search: Update filter diagnostic to ignore non-existing values

Warren Gifford requested to merge fkling/filter-diagnostic into main

Created by: fkling

Sorry for the cryptic title. When you currently use a filter with a fixed set of valid values (e.g. archived:) we show an error diagnostic immediately after typing the filter name. At that point the user didn't even have a chance to provide the value yet.

This small change fixes that. Note however that this will only work if there are no other characters after the filter, i.e. the filter is at the end of the input. Only then the value will be undefined (vs being an empty literal if other characters follow the filter). But I think that's "good enough".

See the before/after video for the difference.

https://user-images.githubusercontent.com/179026/177943549-0a767692-d2b5-4bd1-bee2-465520a7c02e.mp4

Test plan

Enter filter with fixed set of valid values (e.g. archived:). Diagnostic indicator should not immediately appear.

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading