]> cat aescling's git repositories - mastodon.git/commitdiff
Revert "Change "Allow trends without prior review" setting to include statuses (...
authorClaire <claire.github-309c@sitedethib.com>
Sun, 2 Oct 2022 16:11:46 +0000 (18:11 +0200)
committeraescling <aescling+gitlab@cat.family>
Thu, 17 Nov 2022 03:35:15 +0000 (22:35 -0500)
This reverts commit 546672e292dc3218e996048464c4c52e5d00f766.

app/javascript/styles/mastodon/accounts.scss
app/javascript/styles/mastodon/forms.scss
app/models/account.rb
app/views/admin/settings/edit.html.haml
config/i18n-tasks.yml
config/initializers/simple_form.rb
config/locales/en.yml
config/locales/simple_form.en.yml

index c007eb4b57ee7464fc8c2f6d3c2008fdf590a7f5..54b65bfc8c2b111fc2da8c973639994d0d3bc332 100644 (file)
 }
 
 .account-role,
-.simple_form .recommended,
-.simple_form .not_recommended {
+.simple_form .recommended {
   display: inline-block;
   padding: 4px 6px;
   cursor: default;
   }
 }
 
-.simple_form .not_recommended {
-  color: lighten($error-red, 12%);
-  background-color: rgba(lighten($error-red, 12%), 0.1);
-  border-color: rgba(lighten($error-red, 12%), 0.5);
-}
-
 .account__header__fields {
   max-width: 100vw;
   padding: 0;
index a6419821f4c94f1672446c037fdfabe128e56d32..990903859013ac297a93ad3de9d1b3daa274aff7 100644 (file)
@@ -102,8 +102,7 @@ code {
         }
       }
 
-      .recommended,
-      .not_recommended {
+      .recommended {
         position: absolute;
         margin: 0 4px;
         margin-top: -2px;
index 33870beda48606d8bc83ffbf4c8d67b535c643a5..f75750838c93fcd55fb5ae890ced270041481ac4 100644 (file)
@@ -262,10 +262,6 @@ class Account < ApplicationRecord
     update!(memorial: true)
   end
 
-  def trendable
-    boolean_with_default('trendable', Setting.trendable_by_default)
-  end
-
   def sign?
     true
   end
index c8ebb336052d60518148547b28d3516a3fcceb39..f2fdab90d071ee5fb822ea295dbdf581627cfbba 100644 (file)
@@ -81,7 +81,7 @@
       = f.input :trends, as: :boolean, wrapper: :with_label, label: t('admin.settings.trends.title'), hint: t('admin.settings.trends.desc_html')
 
     .fields-group
-      = f.input :trendable_by_default, as: :boolean, wrapper: :with_label, label: t('admin.settings.trendable_by_default.title'), hint: t('admin.settings.trendable_by_default.desc_html'), recommended: :not_recommended
+      = f.input :trendable_by_default, as: :boolean, wrapper: :with_label, label: t('admin.settings.trendable_by_default.title'), hint: t('admin.settings.trendable_by_default.desc_html')
 
     .fields-group
       = f.input :trending_status_cw, as: :boolean, wrapper: :with_label, label: t('admin.settings.trending_status_cw.title'), hint: t('admin.settings.trending_status_cw.desc_html')
index cc607f72af9d7cd0ac2e7908df14c748fe36717f..7139bcea7c6834b4c8f002bd9f063d994a47be6f 100644 (file)
@@ -51,7 +51,7 @@ ignore_unused:
   - 'activerecord.errors.*'
   - '{devise,pagination,doorkeeper}.*'
   - '{date,datetime,time,number}.*'
-  - 'simple_form.{yes,no,recommended,not_recommended}'
+  - 'simple_form.{yes,no,recommended}'
   - 'simple_form.{placeholders,hints,labels}.*'
   - 'simple_form.{error_notification,required}.:'
   - 'errors.messages.*'
index 92cffc5a2a40f1bd52201d41d740f78f792e85ca..3a2097d2fb9dc52f63c0252d247776e55d689f89 100644 (file)
@@ -11,10 +11,7 @@ end
 module RecommendedComponent
   def recommended(_wrapper_options = nil)
     return unless options[:recommended]
-
-    key = options[:recommended].is_a?(Symbol) ? options[:recommended] : :recommended
-    options[:label_text] = ->(raw_label_text, _required_label_text, _label_present) { safe_join([raw_label_text, ' ', content_tag(:span, I18n.t(key, scope: 'simple_form'), class: key)]) }
-
+    options[:label_text] = ->(raw_label_text, _required_label_text, _label_present) { safe_join([raw_label_text, ' ', content_tag(:span, I18n.t('simple_form.recommended'), class: 'recommended')]) }
     nil
   end
 end
index dd341e0c891c604e8040d87b326354bf8138faf4..6f0f3e9539c298dd6be7d6b0c372524e2df12381 100644 (file)
@@ -807,8 +807,8 @@ en:
         title: Allow unauthenticated access to public timeline
       title: Site settings
       trendable_by_default:
-        desc_html: Specific trending content can still be explicitly disallowed
-        title: Allow trends without prior review
+        desc_html: Affects hashtags that have not been previously disallowed
+        title: Allow hashtags to trend without prior review
       trends:
         desc_html: Publicly display previously reviewed content that is currently trending
         title: Trends
index db5b45e41038d8949e05dfbd8589f101a5431712..ec4c445e856824ab26aa2584c752df9cbfb95c2b 100644 (file)
@@ -261,7 +261,6 @@ en:
         events: Enabled events
         url: Endpoint URL
     'no': 'No'
-    not_recommended: Not recommended
     recommended: Recommended
     required:
       mark: "*"