Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
copy: Use redesigned copy button in view original message UI.
Sayam Samal2e4e017a18ca
diff --git a/help/view-the-markdown-source-of-a-message.md b/help/view-the-markdown-source-of-a-message.mdindex bb01188faf6..5c9e242329c 100644--- a/help/view-the-markdown-source-of-a-message.md+++ b/help/view-the-markdown-source-of-a-message.md@@ -33,7 +33,7 @@ formatted, or to copy the Markdown source for a reply.menu option for editable messages that you have sent.1. Click the **Copy and close**- ( <img src="/static/images/help/copy_to_clipboard.svg" alt="copy" class="help-center-icon"/>)+ (<i class="zulip-icon zulip-icon-copy"></i>)widget in the upper right corner of the message.!!! keyboard_tip ""diff --git a/static/images/help/copy_to_clipboard.svg b/static/images/help/copy_to_clipboard.svgdeleted file mode 100644index d14cdde6f94..00000000000--- a/static/images/help/copy_to_clipboard.svg+++ /dev/null@@ -1,3 +0,0 @@-<svg viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">- <path fill="#777" d="M128 768h256v64H128v-64z m320-384H128v64h320v-64z m128 192V448L384 640l192 192V704h320V576H576z m-288-64H128v64h160v-64zM128 704h160v-64H128v64z m576 64h64v128c-1 18-7 33-19 45s-27 18-45 19H64c-35 0-64-29-64-64V192c0-35 29-64 64-64h192C256 57 313 0 384 0s128 57 128 128h192c35 0 64 29 64 64v320h-64V320H64v576h640V768zM128 256h512c0-35-29-64-64-64h-64c-35 0-64-29-64-64s-29-64-64-64-64 29-64 64-29 64-64 64h-64c-35 0-64 29-64 64z" />-</svg>diff --git a/web/src/message_edit.ts b/web/src/message_edit.tsindex b643b6c53c5..5e32d57f72a 100644--- a/web/src/message_edit.ts+++ b/web/src/message_edit.ts@@ -449,9 +449,10 @@ function create_copy_to_clipboard_handler(});clipboard.on("success", () => {- // Hide the Tippy and source box after a 600ms delay- const tippy_timeout_in_ms = 600;+ // Hide the Tippy and source box after a 1000ms delay+ const tippy_timeout_in_ms = 1000;show_copied_confirmation(the($row.find(".copy_message")), {+ show_check_icon: true,timeout_in_ms: tippy_timeout_in_ms,on_hide_callback() {end_message_row_edit($row);diff --git a/web/styles/message_row.css b/web/styles/message_row.cssindex 376d70f4c4c..d218799936a 100644--- a/web/styles/message_row.css+++ b/web/styles/message_row.css@@ -655,6 +655,7 @@}.edit-content-container {+ position: relative;border-radius: 4px;border: 1px solid var(--color-message-content-container-border);transition: border 0.2s ease;diff --git a/web/styles/zulip.css b/web/styles/zulip.cssindex e63050f45f5..3c4274af987 100644--- a/web/styles/zulip.css+++ b/web/styles/zulip.css@@ -632,18 +632,12 @@ li,}.copy_message {- float: right;- position: relative;- cursor: pointer;- top: 30px;- /* To make sure the svg doesn't occupy any vertical space. */- margin-top: -30px;- right: 2px;- padding-top: 2px;-- #clipboard_image {- margin: 0;- }+ position: absolute;+ top: 5px;+ right: 5px;+ height: 1em;+ backdrop-filter: blur(20px);+ outline: 1px solid var(--color-copy-btn-square-bg-active);}#copy_generated_link_container {diff --git a/web/templates/copy_message_button.hbs b/web/templates/copy_message_button.hbsdeleted file mode 100644index 66682e9baec..00000000000--- a/web/templates/copy_message_button.hbs+++ /dev/null@@ -1,3 +0,0 @@-<div class="copy_button_base copy_message tippy-zulip-tooltip" data-tippy-content="{{t 'Copy and close' }}" aria-label="{{t 'Copy and close' }}" role="button">- {{> copy_to_clipboard_svg }}-</div>diff --git a/web/templates/message_edit_form.hbs b/web/templates/message_edit_form.hbsindex afa63af49b9..0e9ac39fbd5 100644--- a/web/templates/message_edit_form.hbs+++ b/web/templates/message_edit_form.hbs@@ -4,7 +4,9 @@<form id="edit_form_{{message_id}}"><div class="edit_form_banners"></div><div class="edit-controls edit-content-container {{#if is_editable}}surround-formatting-buttons-row{{/if}}">- {{> copy_message_button message_id=this.message_id}}+ <span class="copy_message copy-btn copy-btn-square tippy-zulip-tooltip" data-tippy-content="{{t 'Copy and close' }}" aria-label="{{t 'Copy and close' }}" role="button">+ <i class="zulip-icon zulip-icon-copy" aria-hidden="true"></i>+ </span><textarea class="message_edit_content" maxlength="{{ max_message_length }}">{{content}}</textarea><div class="scrolling_list preview_message_area" id="preview_message_area_{{message_id}}" style="display:none;"><div class="markdown_preview_spinner"></div>