From 97f701bc4c27c46b9660520d7c79cdac84895dea Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Tue, 10 Aug 2021 19:31:29 +0530 Subject: [PATCH] UX: update member visibility help text to include flair information (#13995) --- .../app/components/groups-form-interaction-fields.js | 11 +++++++++++ .../components/groups-form-interaction-fields.hbs | 2 +- config/locales/client.en.yml | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/components/groups-form-interaction-fields.js b/app/assets/javascripts/discourse/app/components/groups-form-interaction-fields.js index c0103a737ca..887ba2147f0 100644 --- a/app/assets/javascripts/discourse/app/components/groups-form-interaction-fields.js +++ b/app/assets/javascripts/discourse/app/components/groups-form-interaction-fields.js @@ -97,4 +97,15 @@ export default Component.extend({ canAdminGroup(isCreated, canAdmin, canCreate) { return (!isCreated && canCreate) || (isCreated && canAdmin); }, + + @discourseComputed("membersVisibilityLevel") + membersVisibilityLevelsDescription(membersVisibilityLevel) { + if ( + membersVisibilityLevel === this.visibilityLevelOptions.firstObject.value + ) { + return "admin.groups.manage.interaction.members_visibility_levels.description"; + } else { + return "admin.groups.manage.interaction.members_visibility_levels.description_flair_visible"; + } + }, }); diff --git a/app/assets/javascripts/discourse/app/templates/components/groups-form-interaction-fields.hbs b/app/assets/javascripts/discourse/app/templates/components/groups-form-interaction-fields.hbs index 82725adc49c..e5eeb7bb459 100644 --- a/app/assets/javascripts/discourse/app/templates/components/groups-form-interaction-fields.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/groups-form-interaction-fields.hbs @@ -30,7 +30,7 @@ }}
- {{i18n "admin.groups.manage.interaction.members_visibility_levels.description"}} + {{i18n membersVisibilityLevelsDescription}}
{{/if}} diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 5a3939be3ac..7112812d3ff 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -3919,6 +3919,7 @@ en: members_visibility_levels: title: "Who can see this group's members?" description: "Admins can see members of all groups." + description_flair_visible: "Admins can see members of all groups. Flair is visible to all users." publish_read_state: "On group messages publish group read state" membership: