I like the UI with the switch above the search pills
Review Hints (Usability):
- Right now it is confusing for the user if he enters multiple search pills with the same criterium and the ANY modifier. E.g. Task Name is A or Task Name is B. In that case, only the last criterium is used. We should somehow make clear that this is not supported, ideally by preventing the user to create a second search pill with the same criterium. Is there already a ticket for that?
- The Cockpit Process Instance Search looks broken right now. I don't know whether this is because of the changes for this ticket or something unrelated. We should fix it or create tickets for it.
- Problem 1: The controls for the search overflow the box and are outside the input field.
- Problem 2: When performing a search that does not return any results, the search result number disappears instead of showing 0.
Review Hints (Code):
- Are we expecting more match types than any and all? If not, we can change the datatype to boolean. That would make some operations like switching the type easier.
- The isMatchTypeActive function will not work correctly if there are multiple search widgets on the same page. The jQuery selector will only look at the first occurence of the element and return the attributes of that one. We should use the element argument instead.
- The Code to read the queryMatchType from the location is duplicated in the search widget. We could have this as a re-usable function
- Could we use the original variable instead of having the deeply nested structure here?
- The translations for the match types should be done in commons-ui instead of the tasklist. Otherwise translations may be missing when we use the search widget with the OR functionality in Cockpit in the future.