From 2e17e6269cafa14611d0a9166e13a1758ca1cca8 Mon Sep 17 00:00:00 2001 From: Tobias Eigen Date: Tue, 6 Apr 2021 16:28:10 -0700 Subject: [PATCH] FIX: Small tweaks to "no messages" education (#12588) * Remove "Message" button in quick access menu no messages education * Reword education prompt * Remove background colour --- .../app/widgets/quick-access-messages.js | 41 ++++++------------- .../stylesheets/common/base/empty-state.scss | 6 +-- config/locales/client.en.yml | 4 +- 3 files changed, 17 insertions(+), 34 deletions(-) diff --git a/app/assets/javascripts/discourse/app/widgets/quick-access-messages.js b/app/assets/javascripts/discourse/app/widgets/quick-access-messages.js index a5505fa8882..b2da0ab43a8 100644 --- a/app/assets/javascripts/discourse/app/widgets/quick-access-messages.js +++ b/app/assets/javascripts/discourse/app/widgets/quick-access-messages.js @@ -27,37 +27,20 @@ function toItem(message) { createWidget("no-quick-access-messages", { html() { - let privacyLink = - this.siteSettings.privacy_policy_url || getURL("/privacy"); - - let rawHtml = [ - `
-

- ${I18n.t("user.no_messages_body", { - privacyLink, - }).htmlSafe()}

`, - ]; - - if (this.currentUser.can_send_private_messages) { - rawHtml.push( - `

- - ${iconHTML("envelope")}${I18n.t( - "user.new_private_message" - ).htmlSafe()} - -

` - ); - } - rawHtml.push("
"); - return h("div.empty-state", [ h("span.empty-state-title", I18n.t("user.no_messages_title")), - new RawHtml({ - html: rawHtml.join(""), - }), + h( + "div.empty-state-body", + new RawHtml({ + html: + "

" + + I18n.t("user.no_messages_body", { + aboutUrl: getURL("/about"), + icon: iconHTML("envelope"), + }).htmlSafe() + + "

", + }) + ), ]); }, }); diff --git a/app/assets/stylesheets/common/base/empty-state.scss b/app/assets/stylesheets/common/base/empty-state.scss index 7d78720bb23..7c1245a7c22 100644 --- a/app/assets/stylesheets/common/base/empty-state.scss +++ b/app/assets/stylesheets/common/base/empty-state.scss @@ -1,15 +1,15 @@ .empty-state { - background: var(--tertiary-low); color: var(--primary); margin: 0; - padding: 1em 1.5em; + padding: 0.5em 1em; display: flex; flex-direction: column; .empty-state-title { font-weight: 700; - padding: 0 0 0.5em 0; + padding: 0; margin: 0; + font-size: $font-up-1; } .empty-state-body { diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 4fc3fbf58f8..31de720fd34 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1026,8 +1026,8 @@ en: dismiss_notifications_tooltip: "Mark all unread notifications as read" no_messages_title: "You don’t have any messages" no_messages_body: > - Need to have a direct personal conversation with someone, outside the normal conversational flow?

- Message them by selecting their avatar and then look for the MESSAGE button. + Need to have a direct personal conversation with someone, outside the normal conversational flow? Message them by selecting their avatar and using the %{icon} message button.

+ If you need help, you can message a staff member. first_notification: "Your first notification! Select it to begin." dynamic_favicon: "Show counts on browser icon" skip_new_user_tips: