Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

tenor_picker: Use the filter-input styling for search input.

apoorvapendse03bc65961f8d
diff --git a/web/src/tenor.ts b/web/src/tenor.ts
index 21939b864f1..c88378bc9c5 100644
--- a/web/src/tenor.ts
+++ b/web/src/tenor.ts
@@ -194,7 +194,7 @@ function toggle_picker_popover(target: HTMLElement): void {
assert(e.currentTarget instanceof HTMLElement);
handle_gif_click(e.currentTarget);
});
- $popper.on("click", "#gif-search-clear", (e) => {
+ $popper.on("click", ".input-close-filter-button", (e) => {
e.stopPropagation();
$("#gif-search-query").val("");
update_grid_with_search_term("");
diff --git a/web/styles/popovers.css b/web/styles/popovers.css
index fbf3c41d799..ebffe19b557 100644
--- a/web/styles/popovers.css
+++ b/web/styles/popovers.css
@@ -728,28 +728,8 @@ ul.popover-group-menu-member-list {
border: 0;
padding: 0;
- .popover-filter-input-wrapper {
- position: relative;
- }
-
- .clear-search-button {
- position: absolute;
- /* The 60% instead of the usual 50% makes this
- `x` button appear vertically centered inside the
- input instead of the wrapper. */
- top: 60%;
- transform: translateY(-50%);
- right: 0.5em;
- font-size: 1em;
- outline: none;
- background: none;
- border: none;
- padding: 0;
- opacity: 0.5;
-
- &:hover {
- opacity: 1;
- }
+ .gif-search-container {
+ margin: 4px 4px 2px;
}
.tenor-content {
diff --git a/web/templates/gif_picker_ui.hbs b/web/templates/gif_picker_ui.hbs
index 0474d3c06ff..a3cf61cc863 100644
--- a/web/templates/gif_picker_ui.hbs
+++ b/web/templates/gif_picker_ui.hbs
@@ -1,12 +1,9 @@
<div class="gif-grid-in-popover">
<div class="arrow"></div>
<div class="popover-inner">
- <div class="popover-filter-input-wrapper">
- <input type="text" id="gif-search-query" class="popover-filter-input filter_text_input" autocomplete="off" autofocus/>
- <button type="button" class="clear-search-button" id="gif-search-clear" tabindex="-1">
- <i class="zulip-icon zulip-icon-close" aria-hidden="true"></i>
- </button>
- </div>
+ {{#> components/input_wrapper input_type="filter-input" custom_classes="gif-search-container" icon="search" input_button_icon="close"}}
+ <input type="text" class="input-element" id="gif-search-query" autocomplete="off" autofocus/>
+ {{/components/input_wrapper}}
<div class="gif-scrolling-container" data-simplebar data-simplebar-tab-index="-1"></div>
</div>
</div>