mirror of https://github.com/zulip/zulip.git
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.
This commit is contained in:
parent
792a9bd81e
commit
84cf7f8677
|
@ -89,20 +89,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.pill-container-btn {
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
.pill {
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
|
|
||||||
.exit {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 2px 4px;
|
padding: 2px 4px;
|
||||||
|
|
|
@ -246,10 +246,18 @@
|
||||||
|
|
||||||
.search_list_item .pill-container {
|
.search_list_item .pill-container {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pill {
|
.pill {
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
|
margin: 0;
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
.exit {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pill-image {
|
.pill-image {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<span>{{{ description_html }}}</span>
|
<span>{{{ description_html }}}</span>
|
||||||
{{#if is_people}}
|
{{#if is_people}}
|
||||||
{{#each users}}
|
{{#each users}}
|
||||||
<span class="pill-container pill-container-btn">
|
<span class="pill-container">
|
||||||
{{> input_pill user_pill_context}}
|
{{> input_pill user_pill_context}}
|
||||||
</span>
|
</span>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
@ -166,13 +166,13 @@ run_test("initialize", ({override, override_rewire, mock_template}) => {
|
||||||
let expected_value = `<div class="search_list_item">\n <span>Search for zo</span>\n</div>\n`;
|
let expected_value = `<div class="search_list_item">\n <span>Search for zo</span>\n</div>\n`;
|
||||||
assert.equal(opts.highlighter_html(source[0]), expected_value);
|
assert.equal(opts.highlighter_html(source[0]), expected_value);
|
||||||
|
|
||||||
expected_value = `<div class="search_list_item">\n <span>sent by</span>\n <span class="pill-container pill-container-btn">\n <div class='pill ' tabindex=0>\n <img class="pill-image" src="https://secure.gravatar.com/avatar/0f030c97ab51312c7bbffd3966198ced?d=identicon&version=1&s=50" />\n <span class="pill-label">\n <span class="pill-value"><strong>Zo</strong>e</span></span>\n <div class="exit">\n <span aria-hidden="true">×</span>\n </div>\n</div>\n </span>\n</div>\n`;
|
expected_value = `<div class="search_list_item">\n <span>sent by</span>\n <span class="pill-container">\n <div class='pill ' tabindex=0>\n <img class="pill-image" src="https://secure.gravatar.com/avatar/0f030c97ab51312c7bbffd3966198ced?d=identicon&version=1&s=50" />\n <span class="pill-label">\n <span class="pill-value"><strong>Zo</strong>e</span></span>\n <div class="exit">\n <span aria-hidden="true">×</span>\n </div>\n</div>\n </span>\n</div>\n`;
|
||||||
assert.equal(opts.highlighter_html(source[1]), expected_value);
|
assert.equal(opts.highlighter_html(source[1]), expected_value);
|
||||||
|
|
||||||
expected_value = `<div class="search_list_item">\n <span>direct messages with</span>\n <span class="pill-container pill-container-btn">\n <div class='pill ' tabindex=0>\n <img class="pill-image" src="https://secure.gravatar.com/avatar/0f030c97ab51312c7bbffd3966198ced?d=identicon&version=1&s=50" />\n <span class="pill-label">\n <span class="pill-value"><strong>Zo</strong>e</span></span>\n <div class="exit">\n <span aria-hidden="true">×</span>\n </div>\n</div>\n </span>\n</div>\n`;
|
expected_value = `<div class="search_list_item">\n <span>direct messages with</span>\n <span class="pill-container">\n <div class='pill ' tabindex=0>\n <img class="pill-image" src="https://secure.gravatar.com/avatar/0f030c97ab51312c7bbffd3966198ced?d=identicon&version=1&s=50" />\n <span class="pill-label">\n <span class="pill-value"><strong>Zo</strong>e</span></span>\n <div class="exit">\n <span aria-hidden="true">×</span>\n </div>\n</div>\n </span>\n</div>\n`;
|
||||||
assert.equal(opts.highlighter_html(source[2]), expected_value);
|
assert.equal(opts.highlighter_html(source[2]), expected_value);
|
||||||
|
|
||||||
expected_value = `<div class="search_list_item">\n <span>group direct messages including</span>\n <span class="pill-container pill-container-btn">\n <div class='pill ' tabindex=0>\n <img class="pill-image" src="https://secure.gravatar.com/avatar/0f030c97ab51312c7bbffd3966198ced?d=identicon&version=1&s=50" />\n <span class="pill-label">\n <span class="pill-value"><strong>Zo</strong>e</span></span>\n <div class="exit">\n <span aria-hidden="true">×</span>\n </div>\n</div>\n </span>\n</div>\n`;
|
expected_value = `<div class="search_list_item">\n <span>group direct messages including</span>\n <span class="pill-container">\n <div class='pill ' tabindex=0>\n <img class="pill-image" src="https://secure.gravatar.com/avatar/0f030c97ab51312c7bbffd3966198ced?d=identicon&version=1&s=50" />\n <span class="pill-label">\n <span class="pill-value"><strong>Zo</strong>e</span></span>\n <div class="exit">\n <span aria-hidden="true">×</span>\n </div>\n</div>\n </span>\n</div>\n`;
|
||||||
assert.equal(opts.highlighter_html(source[3]), expected_value);
|
assert.equal(opts.highlighter_html(source[3]), expected_value);
|
||||||
|
|
||||||
/* Test sorter */
|
/* Test sorter */
|
||||||
|
|
Loading…
Reference in New Issue