UX: remove global notice to enable encryption

UX: remove global notice to enable encryption

We should defer annoying users till the last possible chance.

This means just as you are composing a message and if we discover you
have encryption setup, and the user you are composing to does as well,
and you are just about to post the message which has lock ticked. At that
point, a modal of “Please enter your encryption password” is reasonable.

Otherwise every 1 time user of the feature is going to be constantly reminded
of a feature they may have only used once.

From 2a484bb35a4400d3536d7355d2f4331ff856bab0 Mon Sep 17 00:00:00 2001
From: Sam <sam.saffron@gmail.com>
Date: Fri, 30 Nov 2018 11:24:24 +1100
Subject: [PATCH] UX: remove global notice to enable encryption

We should defer annoying users till the last possible chance.

This means just as you are composing a message and if we discover you
have encryption setup, and the user you are composing to does as well,
and you are just about to post the message which has lock ticked. At that
point, a modal of "Please enter your encryption password" is reasonable.

Otherwise every 1 time user of the feature is going to be constantly reminded
of a feature they may have only used once.

diff --git a/assets/javascripts/discourse/connectors/top-notices/encrypt.hbs b/assets/javascripts/discourse/connectors/top-notices/encrypt.hbs
deleted file mode 100644
index 313d1c0..0000000
--- a/assets/javascripts/discourse/connectors/top-notices/encrypt.hbs
+++ /dev/null
@@ -1,7 +0,0 @@
-{{#if isEncryptEnabled}}
-  <div class='row'>
-    <div class='alert alert-info alert-too-few-topics'>
-      {{i18n 'encrypt.notice.info'}} <a href="/my/preferences/account">{{i18n 'encrypt.notice.enable'}}</a>
-    </div>
-  </div>
-{{/if}}
diff --git a/assets/javascripts/discourse/connectors/top-notices/encrypt.js.es6 b/assets/javascripts/discourse/connectors/top-notices/encrypt.js.es6
deleted file mode 100644
index 4b4f6c8..0000000
--- a/assets/javascripts/discourse/connectors/top-notices/encrypt.js.es6
+++ /dev/null
@@ -1,7 +0,0 @@
-import { hideComponentIfDisabled } from "discourse/plugins/discourse-encrypt/lib/discourse";
-
-export default {
-  setupComponent(args, component) {
-    hideComponentIfDisabled(component);
-  }
-};
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index d61a0b4..95fbee3 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -13,10 +13,6 @@ en:
         unchecked: "Click the lock symbol to encrypt this message."
         disabled: "One of the recipients did not enable encryption."
 
-      notice:
-        info: "You have enabled encryption, but it is not active on this device. To read any encrypted private messages, please activate it first."
-        enable: "Follow the instructions from user preferences screen to do that."
-
       composer:
         encrypt: "Encrypt message?"
         user_has_no_key: "Message will not be encrypted, {{username}} has not enabled encryption yet."

GitHub

1 Like

Oh My! Thanks you :pray:

I never realized how annoying this was until I saw this commit.

Thanks! :heart:

1 Like