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.

compose: Remove "Drafts" button.

Wesley Aptekar-Casselsfe89dee284c9
diff --git a/frontend_tests/puppeteer_tests/drafts.ts b/frontend_tests/puppeteer_tests/drafts.ts
index 6e8274a7ec8..fec9e601cf1 100644
--- a/frontend_tests/puppeteer_tests/drafts.ts
+++ b/frontend_tests/puppeteer_tests/drafts.ts
@@ -20,7 +20,7 @@ async function get_drafts_count(page: Page): Promise<number> {
return await page.$$eval(".draft-row", (drafts) => drafts.length);
}
-const drafts_button = ".compose_drafts_button";
+const drafts_button = ".top_left_drafts";
const drafts_overlay = "#draft_overlay";
const drafts_button_in_compose = "#below-compose-content .drafts-link";
diff --git a/static/js/drafts.js b/static/js/drafts.js
index a7698c9062a..f8e11fffd2d 100644
--- a/static/js/drafts.js
+++ b/static/js/drafts.js
@@ -26,9 +26,6 @@ import * as ui_util from "./ui_util";
import * as util from "./util";
function set_count(count) {
- const draft_count = count.toString();
- const text = $t({defaultMessage: "Drafts ({draft_count})"}, {draft_count});
- $(".compose_drafts_button").text(text);
const drafts_li = $(".top_left_drafts");
ui_util.update_unread_count_in_dom(drafts_li, count);
}
@@ -147,10 +144,10 @@ export function restore_message(draft) {
function draft_notify() {
// Display a tooltip to notify the user about the saved draft.
- const instance = tippy(".compose_drafts_button", {
+ const instance = tippy(".top_left_drafts .unread_count", {
content: $t({defaultMessage: "Saved as draft"}),
arrow: true,
- placement: "top",
+ placement: "right",
})[0];
instance.show();
function remove_instance() {
diff --git a/static/templates/compose.hbs b/static/templates/compose.hbs
index 492385c957a..0a34c82858d 100644
--- a/static/templates/compose.hbs
+++ b/static/templates/compose.hbs
@@ -36,11 +36,6 @@
{{t 'Log in to send messages' }}
</a>
</span>
- <span class="new_message_button hidden-for-spectators">
- <a class="drafts-link no-underline button small rounded compose_drafts_button" href="#drafts" title="{{t 'Drafts' }} (d)">
- {{t 'Drafts' }}
- </a>
- </span>
</div>
</div>
<div class="message_comp">