From 84cf7f8677d8033ff03f6b2e337a2b71af8a3b52 Mon Sep 17 00:00:00 2001 From: evykassirer Date: Fri, 24 May 2024 13:13:41 -0700 Subject: [PATCH] input pill: Remove pill-container-btn class in favor of search styling. This style is currently only used for search suggestions. Soon, styling for those suggestions will become more specific, and so for now we'll keep those styles in search.css to be more clear about what the new styles affect. If we want to repeat something like this in the future somewhere else in the app, we can come up with a generic styling then once we have a better idea of what that will look like. --- web/styles/input_pill.css | 14 -------------- web/styles/search.css | 8 ++++++++ web/templates/search_list_item.hbs | 2 +- web/tests/search.test.js | 6 +++--- 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/web/styles/input_pill.css b/web/styles/input_pill.css index 52c19c7244..55e6bf470d 100644 --- a/web/styles/input_pill.css +++ b/web/styles/input_pill.css @@ -89,20 +89,6 @@ } } - &.pill-container-btn { - cursor: pointer; - padding: 0; - - .pill { - margin: 0; - border: none; - - .exit { - display: none; - } - } - } - .input { display: inline-block; padding: 2px 4px; diff --git a/web/styles/search.css b/web/styles/search.css index e5a4da9b35..a59bdee71f 100644 --- a/web/styles/search.css +++ b/web/styles/search.css @@ -246,10 +246,18 @@ .search_list_item .pill-container { margin-left: 5px; + cursor: pointer; + padding: 0; } .pill { align-items: baseline; + margin: 0; + border: none; + + .exit { + display: none; + } } .pill-image { diff --git a/web/templates/search_list_item.hbs b/web/templates/search_list_item.hbs index e977d28bc7..96404ade99 100644 --- a/web/templates/search_list_item.hbs +++ b/web/templates/search_list_item.hbs @@ -2,7 +2,7 @@ {{{ description_html }}} {{#if is_people}} {{#each users}} - + {{> input_pill user_pill_context}} {{/each}} diff --git a/web/tests/search.test.js b/web/tests/search.test.js index 9a1908da9a..072e24313c 100644 --- a/web/tests/search.test.js +++ b/web/tests/search.test.js @@ -166,13 +166,13 @@ run_test("initialize", ({override, override_rewire, mock_template}) => { let expected_value = `
\n Search for zo\n
\n`; assert.equal(opts.highlighter_html(source[0]), expected_value); - expected_value = `
\n sent by\n \n
\n \n \n <strong>Zo</strong>e\n
\n \n
\n
\n
\n
\n`; + expected_value = `
\n sent by\n \n
\n \n \n <strong>Zo</strong>e\n
\n \n
\n
\n
\n
\n`; assert.equal(opts.highlighter_html(source[1]), expected_value); - expected_value = `
\n direct messages with\n \n
\n \n \n <strong>Zo</strong>e\n
\n \n
\n
\n
\n
\n`; + expected_value = `
\n direct messages with\n \n
\n \n \n <strong>Zo</strong>e\n
\n \n
\n
\n
\n
\n`; assert.equal(opts.highlighter_html(source[2]), expected_value); - expected_value = `
\n group direct messages including\n \n
\n \n \n <strong>Zo</strong>e\n
\n \n
\n
\n
\n
\n`; + expected_value = `
\n group direct messages including\n \n
\n \n \n <strong>Zo</strong>e\n
\n \n
\n
\n
\n
\n`; assert.equal(opts.highlighter_html(source[3]), expected_value); /* Test sorter */