mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
search_query: Prevent overflow of long search queries.
Previously, when searching for extremely long queries, they would overflow beyond the screen. This commit fixes the bug by ensuring that long search queries do not overflow. Fixes: #29568
This commit is contained in:
committed by
Tim Abbott
parent
b16bd27e9c
commit
9b0477d771
@@ -1329,6 +1329,10 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {
|
||||
|
||||
.empty-feed-notice-description {
|
||||
font-size: 1.1em;
|
||||
|
||||
.search-query-word {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
}
|
||||
|
||||
.message-fade,
|
||||
|
@@ -17,7 +17,7 @@
|
||||
{{#if is_stop_word}}
|
||||
<del>{{query_word}}</del>
|
||||
{{else}}
|
||||
<span>{{query_word}}</span>
|
||||
<span class="search-query-word">{{query_word}}</span>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{else}}
|
||||
|
@@ -136,7 +136,7 @@ run_test("empty_narrow_html", ({mock_template}) => {
|
||||
Some common words were excluded from your search. <br/>You searched for:
|
||||
<span>channel: new</span>
|
||||
<span>topic: test</span>
|
||||
<span>search</span>
|
||||
<span class="search-query-word">search</span>
|
||||
<del>a</del>
|
||||
</div>
|
||||
</div>
|
||||
@@ -160,7 +160,7 @@ run_test("empty_narrow_html", ({mock_template}) => {
|
||||
<div class="empty-feed-notice-description">
|
||||
You searched for:
|
||||
<span>channel: hello world</span>
|
||||
<span>searchA</span>
|
||||
<span class="search-query-word">searchA</span>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
@@ -183,7 +183,7 @@ run_test("empty_narrow_html", ({mock_template}) => {
|
||||
<div class="empty-feed-notice-description">
|
||||
You searched for:
|
||||
<span>topic: hello</span>
|
||||
<span>searchB</span>
|
||||
<span class="search-query-word">searchB</span>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
@@ -608,7 +608,10 @@ run_test("show_empty_narrow_message_with_search", ({mock_template, override}) =>
|
||||
|
||||
const current_filter = set_filter([["search", "grail"]]);
|
||||
narrow_banner.show_empty_narrow_message(current_filter);
|
||||
assert.match($(".empty_feed_notice_main").html(), /<span>grail<\/span>/);
|
||||
assert.match(
|
||||
$(".empty_feed_notice_main").html(),
|
||||
/<span class="search-query-word">grail<\/span>/,
|
||||
);
|
||||
});
|
||||
|
||||
run_test("hide_empty_narrow_message", () => {
|
||||
|
Reference in New Issue
Block a user