mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
search_pill: Rename non-user type to 'generic_operator'.
This change is meant to remove confusion between a pill's `type` being "search" and its `operator` being "search".
This commit is contained in:
@@ -32,7 +32,7 @@ export type SearchUserPill = {
|
||||
|
||||
type SearchPill =
|
||||
| {
|
||||
type: "search";
|
||||
type: "generic_operator";
|
||||
operator: string;
|
||||
operand: string;
|
||||
negated: boolean | undefined;
|
||||
@@ -51,7 +51,7 @@ export function create_item_from_search_string(search_string: string): SearchPil
|
||||
return undefined;
|
||||
}
|
||||
return {
|
||||
type: "search",
|
||||
type: "generic_operator",
|
||||
operator: search_term.operator,
|
||||
operand: search_term.operand,
|
||||
negated: search_term.negated,
|
||||
|
||||
@@ -407,7 +407,7 @@ run_test("set_search_bar_contents with duplicate pills", () => {
|
||||
const pills = search.search_pill_widget._get_pills_for_testing();
|
||||
assert.equal(pills.length, 1);
|
||||
assert.deepEqual(pills[0].item, {
|
||||
type: "search",
|
||||
type: "generic_operator",
|
||||
operator: "has",
|
||||
operand: "attachment",
|
||||
negated: false,
|
||||
|
||||
Reference in New Issue
Block a user