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.

left_sidebar: Use same 'zulip-icon-close' in all search-boxes.

Harsh92a02c7a18bf
diff --git a/web/styles/app_components.css b/web/styles/app_components.css
index ef2e66b86c7..770472f9c1a 100644
--- a/web/styles/app_components.css
+++ b/web/styles/app_components.css
@@ -488,16 +488,6 @@ old_clear_search_button for consistency. */
margin: 15px 0 -5px 23px;
}
-.topic-list-filter {
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
-
- & input {
- padding-right: 20px;
- }
-}
-
.stream-selection-header-colorblock {
/* box-shadow: 0px 2px 3px hsl(0, 0%, 80%); */
box-shadow:
diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.css
index 3451c96d651..aac7cd2f8d6 100644
--- a/web/styles/left_sidebar.css
+++ b/web/styles/left_sidebar.css
@@ -83,13 +83,6 @@
.topic_search_section {
margin: 3px 0;
-
- .old_clear_search_button {
- grid-area: clear-button;
- /* Override app-component positioning. */
- position: static;
- padding: 0;
- }
}
& li {
@@ -919,8 +912,7 @@ li.top_left_scheduled_messages {
.left-sidebar-navigation-label-container,
.dm-box,
.subscription_block,
-.searching-for-more-topics,
-.topic_search_section {
+.searching-for-more-topics {
display: grid;
align-items: center;
/* This general pattern of elements applies to every single row in the left
@@ -1142,12 +1134,10 @@ li.top_left_scheduled_messages {
}
.topic_search_section {
- grid-template-columns:
- var(--left-sidebar-toggle-width-offset) 0 0
- [filter-box-start] minmax(0, 1fr)
- minmax(0, max-content)
- [clear-button-start] var(--left-sidebar-vdots-width)
- [clear-button-end filter-box-end] 0;
+ padding: 8px 10px;
+ display: grid;
+ grid-template: "search-input clear-search" auto / minmax(0, 1fr) 30px;
+ border-bottom: 1px solid var(--color-border-modal-bar);
}
.topic-box .zero_count {
@@ -1218,7 +1208,13 @@ li.top_left_scheduled_messages {
}
.topic-list-filter {
- grid-area: filter-box;
+ box-shadow: none;
+ padding-right: 28px;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ grid-column: search-input-start / clear-search-end;
+ grid-row: search-input;
}
#filter-topic-input:placeholder-shown + #clear_search_topic_button {
@@ -1730,11 +1726,8 @@ li.topic-list-item {
.direct-messages-search-section {
.stream-list-filter,
.direct-messages-list-filter {
- /* Use the border-box model so flex
- can do its thing despite whatever
- padding and border we specify. */
box-sizing: border-box;
- flex: 1 0 100%;
+ width: 100%;
/* Match the input height exactly
with the row height for a perfect
fit and better vertical alignment. */
@@ -1745,35 +1738,13 @@ li.topic-list-item {
padding-right: 30px;
}
- .old_clear_search_button {
- /* Use the border-box model so flex
- can do its thing despite whatever
- padding and border we specify. */
+ .clear_search_button {
box-sizing: border-box;
- /* Clear inherited positioning. */
position: static;
- /* We're going to use flexbox, not
- positioning, to get the clear button
- over top of the input. This -30px
- margin accomplishes that, in tandem
- with the 30px width of this element,
- which is shared with the ending
- anchor element in left sidebar header
- rows. */
+ display: grid;
+ place-items: center;
width: 30px;
margin-left: -30px;
- /* Flexbox respects z-index; this just
- ensures the button remains over top
- of the input. */
- z-index: 1;
- /* Make the button itself a flex container,
- so we can perfectly center the X icon. */
- display: flex;
- justify-content: center;
- align-items: center;
- /* Flexbox will pull the element open
- to make a generous clickable area. */
- padding: 0;
}
.direct-messages-list-filter:placeholder-shown
diff --git a/web/templates/filter_topics.hbs b/web/templates/filter_topics.hbs
index 59ddbc45ee7..96a5ac957b0 100644
--- a/web/templates/filter_topics.hbs
+++ b/web/templates/filter_topics.hbs
@@ -1,6 +1,6 @@
<div class="topic_search_section filter-topics">
<input class="topic-list-filter home-page-input filter_text_input" id="filter-topic-input" type="text" autocomplete="off" placeholder="{{t 'Filter topics'}}" />
- <button type="button" class="bootstrap-btn old_clear_search_button" id="clear_search_topic_button">
- <i class="fa fa-remove" aria-hidden="true"></i>
+ <button type="button" class="clear_search_button" id="clear_search_topic_button">
+ <i class="zulip-icon zulip-icon-close" aria-hidden="true"></i>
</button>
</div>
diff --git a/web/templates/left_sidebar.hbs b/web/templates/left_sidebar.hbs
index e5e44a67381..4b41b4a6534 100644
--- a/web/templates/left_sidebar.hbs
+++ b/web/templates/left_sidebar.hbs
@@ -165,8 +165,8 @@
</a>
<div class="zoom-out-hide direct-messages-search-section">
<input class="direct-messages-list-filter filter_text_input home-page-input" type="text" autocomplete="off" placeholder="{{t 'Filter direct messages' }}" />
- <button type="button" class="bootstrap-btn old_clear_search_button" id="clear-direct-messages-search-button">
- <i class="fa fa-remove" aria-hidden="true"></i>
+ <button type="button" class="clear_search_button" id="clear-direct-messages-search-button">
+ <i class="zulip-icon zulip-icon-close" aria-hidden="true"></i>
</button>
</div>
</div>
@@ -194,8 +194,8 @@
<div class="notdisplayed stream_search_section">
<input class="stream-list-filter home-page-input filter_text_input" type="text" autocomplete="off" placeholder="{{t 'Filter channels' }}" />
- <button type="button" class="bootstrap-btn old_clear_search_button" id="clear_search_stream_button">
- <i class="fa fa-remove" aria-hidden="true"></i>
+ <button type="button" class="clear_search_button" id="clear_search_stream_button">
+ <i class="zulip-icon zulip-icon-close" aria-hidden="true"></i>
</button>
</div>
</div>