UX: do not show selected composer education messages on whisper post (#14078)

UX: do not show selected composer education messages on whisper post (#14078)

This commit disables the “sequential_replies” and “duplicate_link” education message on composer when creating a whipser post.

diff --git a/app/assets/javascripts/discourse/app/components/composer-messages.js b/app/assets/javascripts/discourse/app/components/composer-messages.js
index e5f1ae9..f61980f 100644
--- a/app/assets/javascripts/discourse/app/components/composer-messages.js
+++ b/app/assets/javascripts/discourse/app/components/composer-messages.js
@@ -130,7 +130,12 @@ export default Component.extend({
       }
     }
 
-    this.queuedForTyping.forEach((msg) => this.send("popup", msg));
+    this.queuedForTyping.forEach((msg) => {
+      if (composer.whisper && msg.hide_if_whisper) {
+        return;
+      }
+      this.send("popup", msg);
+    });
   },
 
   _create(info) {
diff --git a/app/assets/javascripts/discourse/app/controllers/composer.js b/app/assets/javascripts/discourse/app/controllers/composer.js
index acd6a05..43dad34 100644
--- a/app/assets/javascripts/discourse/app/controllers/composer.js
+++ b/app/assets/javascripts/discourse/app/controllers/composer.js
@@ -501,7 +501,7 @@ export default Controller.extend({
 
           const [linkWarn, linkInfo] = linkLookup.check(post, href);
 
-          if (linkWarn) {
+          if (linkWarn && !this.get("isWhispering")) {
             const body = I18n.t("composer.duplicate_link", {
               domain: linkInfo.domain,
               username: linkInfo.username,
diff --git a/lib/composer_messages_finder.rb b/lib/composer_messages_finder.rb
index fcacecb..1cb989c 100644
--- a/lib/composer_messages_finder.rb
+++ b/lib/composer_messages_finder.rb
@@ -117,6 +117,7 @@ class ComposerMessagesFinder
       templateName: 'education',
       wait_for_typing: true,
       extraClass: 'education-message',
+      hide_if_whisper: true,
       body: PrettyText.cook(I18n.t('education.sequential_replies'))
     }
   end

GitHub sha: c481f2ce16637fb8be5f092967db8617f0e4f614

This commit appears in #14078 which was approved by jomaxro. It was merged by techAPJ.

This commit has been mentioned on Discourse Meta. There might be relevant details there: