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.

recents: Match filters to filter-topic input.

Karl Stolleyd90a1d8a2e1d
diff --git a/web/styles/app_variables.css b/web/styles/app_variables.css
index 8560232a274..c1d0f6aa036 100644
--- a/web/styles/app_variables.css
+++ b/web/styles/app_variables.css
@@ -570,9 +570,12 @@
--width-simplebar-scroll: 11px;
--width-simplebar-scroll-hover: 15px;
- /* This is a rough estimate for height occupied by Recent Conversations filters.
- We expect `resize.ts` to update this once UI is initialized. */
- --recent-topics-filters-height: 50px;
+ /* This is the height occupied by Recent Conversations filters,
+ based on the height of the new filter elements in the sidebars
+ and for the topics filter. 31px at 16px/1em. */
+ --recent-topics-filters-height: 1.9375em;
+ /* Legacy margin/flex-gap value for filters. 10px at 14px/1em. */
+ --recent-topics-filters-gap: 0.7142em;
/* Pill dimensions. */
/* 1.5714em is 22px (border-inclusive) at 14px/1em */
diff --git a/web/styles/recent_view.css b/web/styles/recent_view.css
index 0cfa30ec0d5..a0ded55932b 100644
--- a/web/styles/recent_view.css
+++ b/web/styles/recent_view.css
@@ -156,6 +156,7 @@
should match the height of the sidebar filters. */
padding: 10px 10px 0;
display: flex;
+ gap: var(--recent-topics-filters-gap);
/* Search box has no height without this in safari. */
flex: 0 0 auto;
flex-wrap: wrap;
@@ -163,9 +164,15 @@
background: var(--color-background);
}
+ #recent_filters_group {
+ display: flex;
+ flex-flow: row wrap;
+ gap: var(--recent-topics-filters-gap);
+ }
+
#recent-view-search-wrapper {
flex-grow: 1;
- margin-bottom: 0.7142em; /* Legacy 10px at 14px/1em. */
+ margin-bottom: var(--recent-topics-filters-gap);
}
.button-recent-filters {
@@ -173,12 +180,14 @@
background-color: var(--color-background-zulip-button);
border: 1px solid var(--color-border-zulip-button);
border-radius: 40px;
- /* Legacy 5px 10px at 14px/1em. */
- margin: 0 0.3571em 0.7142em 0;
- /* 5px at 16px/1em and legacy 12px at 14px/1em. */
- padding: 0.3125em 0.8571em;
- line-height: 100%;
- display: inline-flex;
+ /* Matching to the height of the filter search box. */
+ height: var(--recent-topics-filters-height);
+ /* Legacy 12px at 14px/1em. */
+ padding: 0 0.8571em;
+
+ flex: 0 0 auto;
+ display: flex;
+ align-items: center;
&:hover {
background-color: var(--color-background-zulip-button-hover);
@@ -609,10 +618,10 @@
#recent-view-filter_widget {
display: inline-flex;
width: 10.7142em; /* 150px at 14px em */
- /* Legacy 5px 10px at 14px/1em. */
- margin: 0 0.3571em 0.7142em 0;
/* 1.5px 6px at 16px/1em */
- padding: 0.0937em 0.375em;
+ padding: 0 0.375em;
+ /* Matching to the height of the filter search box. */
+ height: var(--recent-topics-filters-height);
&:hover {
background-color: var(--color-background-inbox-search-hover);