From fd45f5bbaabcc83ae66e507414c657beba9b3ce5 Mon Sep 17 00:00:00 2001 From: Sasha Sorokin Date: Fri, 29 Nov 2019 23:03:06 +0700 Subject: [PATCH] Improve notifications page (#12497) Currently notifications page seems a bit cluttered with no clear separation between e-mail and filtering settings. This commit tries to address them by adding clear separation with headers, hints and removing continuously reused texts for events checkboxes. --- .../preferences/notifications/show.html.haml | 6 ++++++ config/locales/en.yml | 4 ++++ config/locales/simple_form.en.yml | 16 ++++++++-------- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/app/views/settings/preferences/notifications/show.html.haml b/app/views/settings/preferences/notifications/show.html.haml index f666ae4ff..f71b930e7 100644 --- a/app/views/settings/preferences/notifications/show.html.haml +++ b/app/views/settings/preferences/notifications/show.html.haml @@ -4,6 +4,10 @@ = simple_form_for current_user, url: settings_preferences_notifications_path, html: { method: :put } do |f| = render 'shared/error_messages', object: current_user + %h4= t('notifications.email_events') + + %p.hint = t('notifications.email_events_hint') + .fields-group = f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff| = ff.input :follow, as: :boolean, wrapper: :with_label @@ -21,6 +25,8 @@ = f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff| = ff.input :digest, as: :boolean, wrapper: :with_label + %h4 = t('notifications.other_settings') + .fields-group = f.simple_fields_for :interactions, hash_to_object(current_user.settings.interactions) do |ff| = ff.input :must_be_follower, as: :boolean, wrapper: :with_label diff --git a/config/locales/en.yml b/config/locales/en.yml index 531036a63..783b7a4f6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -886,6 +886,10 @@ en: body: 'Your status was boosted by %{name}:' subject: "%{name} boosted your status" title: New boost + notifications: + email_events: Events for e-mail notifications + email_events_hint: 'Select events that you want to receive notifications for:' + other_settings: Other notifications settings number: human: decimal_units: diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 65951b73b..66f518c1b 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -150,14 +150,14 @@ en: text: Why do you want to join? notification_emails: digest: Send digest e-mails - favourite: Send e-mail when someone favourites your status - follow: Send e-mail when someone follows you - follow_request: Send e-mail when someone requests to follow you - mention: Send e-mail when someone mentions you - pending_account: Send e-mail when a new account needs review - reblog: Send e-mail when someone boosts your status - report: Send e-mail when a new report is submitted - trending_tag: Send e-mail when an unreviewed hashtag is trending + favourite: Someone favourited your status + follow: Someone followed you + follow_request: Someone requested to follow you + mention: Someone mentioned you + pending_account: New account needs review + reblog: Someone boosted your status + report: New report is submitted + trending_tag: An unreviewed hashtag is trending tag: listable: Allow this hashtag to appear in searches and on the profile directory name: Hashtag