Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
saved_snippets: Improve saved snippets UI.
Sayam Samal06abc0bcffc8
diff --git a/web/styles/app_components.css b/web/styles/app_components.cssindex 6df35d25456..848c86c776a 100644--- a/web/styles/app_components.css+++ b/web/styles/app_components.css@@ -1420,3 +1420,22 @@ input.invalid-input {box-shadow: var(--color-invalid-input-box-shadow);}}++/* This is a utility class for line clamping. */+.line-clamp {+ /* Despite the below prefixed properties being deprecated,+ the co-dependency of these three properties is a fully+ specified behavior and will continue to be supported.+ Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/line-clamp */+ display: -webkit-box;+ -webkit-box-orient: vertical;+ /* The value of --line-clamp-value is not defined globally and instead+ inherits the value from another class or the parent element. If it+ is not defined, it defaults to 2. */+ -webkit-line-clamp: var(--line-clamp-value, 2);+ /* Also define the standard property 'line-clamp' for compatibility,+ for when the vendor prefix "-webkit-" is no longer required. */+ line-clamp: var(--line-clamp-value, 2);+ text-overflow: ellipsis;+ overflow: hidden;+}diff --git a/web/styles/compose.css b/web/styles/compose.cssindex 714f5e54c11..78d2a93c483 100644--- a/web/styles/compose.css+++ b/web/styles/compose.css@@ -1663,7 +1663,6 @@ textarea.new_message_textarea {}.dropdown-list-item-description {- white-space: nowrap;font-weight: 400;font-size: 0.9283em; /* 13px at 14px/em */opacity: 0.8;diff --git a/web/styles/zulip.css b/web/styles/zulip.cssindex f64b0d4d8ce..9ac5f9ac230 100644--- a/web/styles/zulip.css+++ b/web/styles/zulip.css@@ -2140,10 +2140,10 @@ body:not(.hide-left-sidebar) {}.dropdown-list-container .dropdown-list .dropdown-list-item-common-styles {+ position: relative;display: flex;color: var(--color-dropdown-item);padding: 3px 10px 3px 8px;- gap: 4px;font-weight: 400;line-height: var(--base-line-height-unitless);white-space: normal;@@ -2160,16 +2160,10 @@ body:not(.hide-left-sidebar) {}.dropdown-list-delete {+ position: absolute;+ top: 0;+ right: 5px;visibility: hidden;- float: right;- margin-right: 5px;- cursor: pointer;- /* hsl(359deg 93% 39%) corresponds to var(--red-550) */- color: color-mix(in oklch, hsl(359deg 93% 39%) 70%, transparent);-- &:hover {- color: hsl(359deg 93% 39%);- }}&:focus,diff --git a/web/templates/dropdown_list.hbs b/web/templates/dropdown_list.hbsindex 0f73ea280a8..40f986d6e8f 100644--- a/web/templates/dropdown_list.hbs+++ b/web/templates/dropdown_list.hbs@@ -6,15 +6,13 @@{{#if bold_current_selection}}<span class="dropdown-list-bold-selected">{{name}}</span>{{#if has_delete_icon}}- <span class="dropdown-list-delete">- <i class="fa fa-trash-o dropdown-list-delete-icon"></i>- </span>+ {{> components/icon_button custom_classes="dropdown-list-delete" intent="danger" icon="trash" aria-label=(t "Delete snippet") }}{{/if}}{{else}}{{name}}{{/if}}</span>- <span class="dropdown-list-item-description">+ <span class="dropdown-list-item-description line-clamp">{{description}}</span></a>