search: Remove unused description_html.

This commit is contained in:
evykassirer 2024-07-29 21:56:39 -07:00 committed by Tim Abbott
parent c09dbcc781
commit 78c9adb33c
2 changed files with 0 additions and 29 deletions

View File

@ -34,7 +34,6 @@ type SearchPill =
| {
type: "search";
display_value: string;
description_html: string;
operator: string;
operand: string;
negated: boolean | undefined;
@ -51,11 +50,9 @@ export function create_item_from_search_string(search_string: string): SearchPil
// This will cause pill validation to fail and trigger a shake animation.
return undefined;
}
const description_html = Filter.search_description_as_html(search_terms);
return {
display_value: search_string,
type: "search",
description_html,
operator: search_term.operator,
operand: search_term.operand,
negated: search_term.negated,

View File

@ -52,11 +52,6 @@ run_test("initialize", ({override, override_rewire, mock_template}) => {
return html;
});
let expected_suggestion_parts = [];
mock_template("search_description.hbs", false, (data, html) => {
assert.deepStrictEqual(data.parts, expected_suggestion_parts);
return html;
});
let expected_pill_display_value = "";
let input_pill_displayed = false;
mock_template("input_pill.hbs", true, (data, html) => {
@ -234,13 +229,6 @@ run_test("initialize", ({override, override_rewire, mock_template}) => {
operand: "ver",
},
];
expected_suggestion_parts = [
{
operand: "ver",
prefix_for_operator: "search for",
type: "prefix_for_operator",
},
];
expected_pill_display_value = null;
_setup(terms);
input_pill_displayed = false;
@ -256,13 +244,6 @@ run_test("initialize", ({override, override_rewire, mock_template}) => {
operand: "Verona",
},
];
expected_suggestion_parts = [
{
type: "prefix_for_operator",
prefix_for_operator: "channel",
operand: "Verona",
},
];
expected_pill_display_value = "channel: Verona";
_setup(terms);
input_pill_displayed = false;
@ -372,13 +353,6 @@ run_test("initialize", ({override, override_rewire, mock_template}) => {
operand: "ver",
},
];
expected_suggestion_parts = [
{
operand: "ver",
prefix_for_operator: "search for",
type: "prefix_for_operator",
},
];
expected_pill_display_value = "ver";
_setup(terms);
ev.key = "Enter";