Remove support for disable_jump_reply user setting (#7359)

Remove support for disable_jump_reply user setting (#7359)

diff --git a/app/assets/javascripts/discourse/components/scrolling-post-stream.js.es6 b/app/assets/javascripts/discourse/components/scrolling-post-stream.js.es6
index 8721f3b..db395dd 100644
--- a/app/assets/javascripts/discourse/components/scrolling-post-stream.js.es6
+++ b/app/assets/javascripts/discourse/components/scrolling-post-stream.js.es6
@@ -261,10 +261,8 @@ export default MountWidget.extend({
   },
 
   _posted(staged) {
-    const disableJumpReply = this.currentUser.get("disable_jump_reply");
-
     this.queueRerender(() => {
-      if (staged && !disableJumpReply) {
+      if (staged) {
         const postNumber = staged.get("post_number");
         DiscourseURL.jumpToPost(postNumber, { skipIfOnScreen: true });
       }
diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6
index a889780..0641f11 100644
--- a/app/assets/javascripts/discourse/controllers/composer.js.es6
+++ b/app/assets/javascripts/discourse/controllers/composer.js.es6
@@ -719,14 +719,9 @@ export default Ember.Controller.extend({
           currentUser.set("reply_count", currentUser.get("reply_count") + 1);
         }
 
-        const disableJumpReply = Discourse.User.currentProp(
-          "disable_jump_reply"
-        );
-        if (!composer.get("replyingToTopic") || !disableJumpReply) {
-          const post = result.target;
-          if (post && !staged) {
-            DiscourseURL.routeTo(post.get("url"));
-          }
+        const post = result.target;
+        if (post && !staged) {
+          DiscourseURL.routeTo(post.get("url"));
         }
       })
       .catch(error => {
diff --git a/app/assets/javascripts/discourse/controllers/preferences/interface.js.es6 b/app/assets/javascripts/discourse/controllers/preferences/interface.js.es6
index cba47fa..8629f61 100644
--- a/app/assets/javascripts/discourse/controllers/preferences/interface.js.es6
+++ b/app/assets/javascripts/discourse/controllers/preferences/interface.js.es6
@@ -31,7 +31,6 @@ export default Ember.Controller.extend(PreferencesTabController, {
       "external_links_in_new_tab",
       "dynamic_favicon",
       "enable_quoting",
-      "disable_jump_reply",
       "automatically_unpin_topics",
       "allow_private_messages",
       "homepage_id",
diff --git a/app/assets/javascripts/discourse/models/user.js.es6 b/app/assets/javascripts/discourse/models/user.js.es6
index f29a4e1..e80e060 100644
--- a/app/assets/javascripts/discourse/models/user.js.es6
+++ b/app/assets/javascripts/discourse/models/user.js.es6
@@ -274,7 +274,6 @@ const User = RestModel.extend({
       "email_previous_replies",
       "dynamic_favicon",
       "enable_quoting",
-      "disable_jump_reply",
       "automatically_unpin_topics",
       "digest_after_minutes",
       "new_topic_duration_minutes",
diff --git a/app/assets/javascripts/discourse/templates/preferences/interface.hbs b/app/assets/javascripts/discourse/templates/preferences/interface.hbs
index 6323af8..61f1303 100644
--- a/app/assets/javascripts/discourse/templates/preferences/interface.hbs
+++ b/app/assets/javascripts/discourse/templates/preferences/interface.hbs
@@ -50,7 +50,6 @@
   {{preference-checkbox labelKey="user.external_links_in_new_tab" checked=model.user_option.external_links_in_new_tab}}
   {{preference-checkbox labelKey="user.enable_quoting" checked=model.user_option.enable_quoting}}
   {{preference-checkbox labelKey="user.dynamic_favicon" checked=model.user_option.dynamic_favicon}}
-  {{preference-checkbox labelKey="user.disable_jump_reply" checked=model.user_option.disable_jump_reply}}
   {{#if siteSettings.automatically_unpin_topics}}
     {{preference-checkbox labelKey="user.automatically_unpin_topics" checked=model.user_option.automatically_unpin_topics}}
   {{/if}}
diff --git a/app/models/user_option.rb b/app/models/user_option.rb
index d75149b..8f84c59 100644
--- a/app/models/user_option.rb
+++ b/app/models/user_option.rb
@@ -53,7 +53,6 @@ class UserOption < ActiveRecord::Base
     self.enable_quoting = SiteSetting.default_other_enable_quoting
     self.external_links_in_new_tab = SiteSetting.default_other_external_links_in_new_tab
     self.dynamic_favicon = SiteSetting.default_other_dynamic_favicon
-    self.disable_jump_reply = SiteSetting.default_other_disable_jump_reply
 
     self.new_topic_duration_minutes = SiteSetting.default_other_new_topic_duration_minutes
     self.auto_track_topics_after_msecs = SiteSetting.default_other_auto_track_topics_after_msecs
@@ -187,6 +186,8 @@ class UserOption < ActiveRecord::Base
 
 end
 
+# TODO: Drop disable_jump_reply column. Functionality removed April 2019
+
 # == Schema Information
 #
 # Table name: user_options
diff --git a/app/serializers/current_user_serializer.rb b/app/serializers/current_user_serializer.rb
index 2894b69..20bad77 100644
--- a/app/serializers/current_user_serializer.rb
+++ b/app/serializers/current_user_serializer.rb
@@ -24,7 +24,6 @@ class CurrentUserSerializer < BasicUserSerializer
              :can_delete_account,
              :should_be_redirected_to_top,
              :redirected_to_top,
-             :disable_jump_reply,
              :custom_fields,
              :muted_category_ids,
              :dismissed_banner_key,
@@ -78,10 +77,6 @@ class CurrentUserSerializer < BasicUserSerializer
     object.user_option.enable_quoting
   end
 
-  def disable_jump_reply
-    object.user_option.disable_jump_reply
-  end
-
   def external_links_in_new_tab
     object.user_option.external_links_in_new_tab
   end
diff --git a/app/serializers/user_option_serializer.rb b/app/serializers/user_option_serializer.rb
index 1ec5f4d..57a8ded 100644
--- a/app/serializers/user_option_serializer.rb
+++ b/app/serializers/user_option_serializer.rb
@@ -8,7 +8,6 @@ class UserOptionSerializer < ApplicationSerializer
              :external_links_in_new_tab,
              :dynamic_favicon,
              :enable_quoting,
-             :disable_jump_reply,
              :digest_after_minutes,
              :automatically_unpin_topics,
              :auto_track_topics_after_msecs,
diff --git a/app/services/user_updater.rb b/app/services/user_updater.rb
index 24e0c2d..eda38fb 100644
--- a/app/services/user_updater.rb
+++ b/app/services/user_updater.rb
@@ -23,7 +23,6 @@ class UserUpdater
     :external_links_in_new_tab,
     :enable_quoting,
     :dynamic_favicon,
-    :disable_jump_reply,
     :automatically_unpin_topics,
     :digest_after_minutes,
     :new_topic_duration_minutes,
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index b6ccfac..7ba9a8f 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -772,7 +772,6 @@ en:
       dismiss_notifications: "Dismiss All"
       dismiss_notifications_tooltip: "Mark all unread notifications as read"
       first_notification: "Your first notification! Select it to begin."
-      disable_jump_reply: "Don't jump to my post after I reply"
       dynamic_favicon: "Show new / updated topic count on browser icon"
       theme_default_on_all_devices: "Make this the default theme on all my devices"
       text_size_default_on_all_devices: "Make this the default text size on all my devices"
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index eeeb371..198aa36 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -1952,7 +1952,6 @@ en:
     default_other_external_links_in_new_tab: "Open external links in a new tab by default."
     default_other_enable_quoting: "Enable quote reply for highlighted text by default."
     default_other_dynamic_favicon: "Show new/updated topic count on browser icon by default."
-    default_other_disable_jump_reply: "Don't jump to user's post after they reply by default."
 
     default_other_like_notification_frequency: "Notify users on likes by default"
 
diff --git a/config/site_settings.yml b/config/site_settings.yml
index 00a79e6..8ac802f 100644
--- a/config/site_settings.yml

[... diff too long, it was truncated ...]

GitHub sha: 24ef4f7b

1 Like

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

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

We do need a follow up here.

2 Likes