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.

right_sidebar: Refactor user search to match left sidebar approach.

Karl Stolley70fd334b2fc5
diff --git a/web/styles/right_sidebar.css b/web/styles/right_sidebar.css
index e221a0784ed..e38b607fad5 100644
--- a/web/styles/right_sidebar.css
+++ b/web/styles/right_sidebar.css
@@ -362,17 +362,27 @@ $user_status_emoji_width: 24px;
}
#user_search_section {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) 28px;
+ grid-template-rows: var(--line-height-sidebar-row-prominent);
white-space: nowrap;
margin-bottom: 10px;
& .user-list-filter {
+ grid-area: 1 / 1 / 2 / 3;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
- width: var(100% - var(--right-sidebar-padding-right));
+ /* Prevent text from colliding with .clear_search_button */
+ padding-right: 28px;
+ /* Push back against inherited styles; let CSS Grid be in
+ charge of the height. */
+ height: auto;
}
.clear_search_button {
- margin-left: -1px;
+ grid-area: 1 / 2 / 2 / 3;
+ position: static;
+ padding: 0;
}
}
diff --git a/web/templates/right_sidebar.hbs b/web/templates/right_sidebar.hbs
index fa248e01f2c..93ec14d46ac 100644
--- a/web/templates/right_sidebar.hbs
+++ b/web/templates/right_sidebar.hbs
@@ -7,7 +7,7 @@
</h4>
<i id="user_filter_icon" class="fa fa-search"></i>
</div>
- <div class="input-append notdisplayed" id="user_search_section">
+ <div class="notdisplayed" id="user_search_section">
<input class="user-list-filter home-page-input filter_text_input" type="text" autocomplete="off" placeholder="{{t 'Search people' }}" />
<button type="button" class="btn clear_search_button" id="clear_search_people_button">
<i class="fa fa-remove" aria-hidden="true"></i>