Commit f6d3f747 authored by Susan Tacker's avatar Susan Tacker

Merge branch 'eread/add-help-text-for-group-name' into 'master'

Add help text for group name and remove now unnecessary documentation

See merge request gitlab-org/gitlab!79598
parents f571dfd3 abcd712e
......@@ -204,7 +204,7 @@ module GroupsHelper
end
def group_url_error_message
s_('GroupSettings|Please choose a group URL with no special characters or spaces.')
s_('GroupSettings|Choose a group path that does not start with a dash or end with a period. It can also contain alphanumeric characters and underscores.')
end
# Maps `jobs_to_be_done` values to option texts
......
......@@ -5,18 +5,20 @@
%fieldset
.row
.form-group.col-md-5
= f.label :name, _('Group name'), class: 'label-bold'
= f.label :name, s_('Groups|Group name'), class: 'label-bold'
= f.text_field :name, class: 'form-control', data: { qa_selector: 'group_name_field' }
.text-muted
= s_('Groups|Must start with letter, digit, emoji, or underscore. Can also contain periods, dashes, spaces, and parentheses.')
.form-group.col-md-7
= f.label :id, _('Group ID'), class: 'label-bold'
= f.label :id, s_('Groups|Group ID'), class: 'label-bold'
= f.text_field :id, class: 'form-control w-auto', readonly: true
.row.gl-mt-3
.form-group.col-md-9
= f.label :description, _('Group description'), class: 'label-bold'
= f.label :description, s_('Groups|Group description'), class: 'label-bold'
= f.text_area :description, class: 'form-control', rows: 3, maxlength: 250
.form-text.text-muted= _('Optional.')
.form-text.text-muted= s_('Groups|Optional group description.')
= render 'shared/repository_size_limit_setting_registration_features_cta', form: f
= render_if_exists 'shared/repository_size_limit_setting', form: f, type: :group
......@@ -24,11 +26,11 @@
.form-group.gl-mt-3.gl-mb-6
.avatar-container.rect-avatar.s90
= group_icon(@group, alt: '', class: 'avatar group-avatar s90')
= f.label :avatar, _('Group avatar'), class: 'label-bold d-block'
= f.label :avatar, s_('Groups|Group avatar'), class: 'label-bold d-block'
= render 'shared/choose_avatar_button', f: f
- if @group.avatar?
%hr
= link_to _('Remove avatar'), group_avatar_path(@group.to_param), data: { confirm: _('Avatar will be removed. Are you sure?')}, method: :delete, class: 'gl-button btn btn-danger-secondary'
= link_to _('Groups|Remove avatar'), group_avatar_path(@group.to_param), data: { confirm: s_('Groups|Avatar will be removed. Are you sure?')}, method: :delete, class: 'gl-button btn btn-danger-secondary'
= render 'shared/visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group
= f.submit _('Save changes'), class: 'btn gl-button btn-confirm mt-4 js-dirty-submit', data: { qa_selector: 'save_name_visibility_settings_button' }
= f.submit s_('Groups|Save changes'), class: 'btn gl-button btn-confirm mt-4 js-dirty-submit', data: { qa_selector: 'save_name_visibility_settings_button' }
......@@ -5,16 +5,18 @@
.row
.form-group.group-name-holder.col-sm-12
= f.label :name, class: 'label-bold' do
= _("Group name")
= f.text_field :name, placeholder: _('My Awesome Group'), class: 'js-autofill-group-name form-control input-lg', data: { qa_selector: 'group_name_field' },
= s_('Groups|Group name')
= f.text_field :name, placeholder: _('My awesome group'), class: 'js-autofill-group-name form-control input-lg', data: { qa_selector: 'group_name_field' },
required: true,
title: _('Please fill in a descriptive name for your group.'),
title: s_('Groups|Enter a descriptive name for your group.'),
autofocus: true
.text-muted
= s_('Groups|Must start with letter, digit, emoji, or underscore. Can also contain periods, dashes, spaces, and parentheses.')
.row
.form-group.col-xs-12.col-sm-8
= f.label :path, class: 'label-bold' do
= _("Group URL")
= s_('Groups|Group URL')
.input-group.gl-field-error-anchor
.group-root-path.input-group-prepend.has-tooltip{ title: group_path, :'data-placement' => 'bottom' }
.input-group-text
......@@ -29,21 +31,21 @@
maxlength: ::Namespace::URL_MAX_LENGTH,
"data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}"
%p.validation-error.gl-field-error.field-validation.hide
= _("Group path is already taken. We've suggested one that is available.")
%p.validation-success.gl-field-success.field-validation.hide= _('Group path is available.')
%p.validation-pending.gl-field-error-ignore.field-validation.hide= _('Checking group URL availability...')
= s_('Groups|Group path is unavailable. Path has been replaced with a suggested available path.')
%p.validation-success.gl-field-success.field-validation.hide= s_('Groups|Group path is available.')
%p.validation-pending.gl-field-error-ignore.field-validation.hide= s_('Groups|Checking group URL availability...')
- if @group.persisted?
.gl-alert.gl-alert-warning.gl-mt-3.gl-mb-3
= sprite_icon('warning', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
.gl-alert-body
= _('Changing group URL can have unintended side effects.')
= s_('Groups|Changing group URL can have unintended side effects.')
= succeed '.' do
= link_to _('Learn more'), help_page_path('user/group/index', anchor: 'change-a-groups-path'), target: '_blank', class: 'gl-link'
= link_to s_('Groups|Learn more'), help_page_path('user/group/index', anchor: 'change-a-groups-path'), target: '_blank', class: 'gl-link'
- if @group.persisted?
.row
.form-group.group-name-holder.col-sm-8
= f.label :id, class: 'label-bold' do
= _("Group ID")
= s_('Groups|Group ID')
= f.text_field :id, class: 'form-control', readonly: true
......@@ -68,19 +68,9 @@ To create a group:
- Select **Menu > Groups**, and on the right, select **Create group**.
- To the left of the search box, select the plus sign and then **New group**.
1. Select **Create group**.
1. For the **Group name**, use only:
- Alphanumeric characters
- Emojis
- Underscores
- Dashes, dots, spaces, and parentheses (however, it cannot start with any of these characters)
For a list of words that cannot be used as group names, see [reserved names](../reserved_names.md).
1. For the **Group URL**, which is used for the [namespace](#namespaces),
use only:
- Alphanumeric characters
- Underscores
- Dashes and dots (it cannot start with dashes or end in a dot)
1. Enter a name for the group in **Group name**. For a list of words that cannot be used as group names, see
[reserved names](../reserved_names.md).
1. Enter a path for the group in **Group URL**, which is used for the [namespace](#namespaces).
1. Choose the [visibility level](../../public_access/public_access.md).
1. Personalize your GitLab experience by answering the following questions:
- What is your role?
......
......@@ -6802,9 +6802,6 @@ msgstr ""
msgid "Changing any setting here requires an application restart"
msgstr ""
msgid "Changing group URL can have unintended side effects."
msgstr ""
msgid "Charts can't be displayed as the request for data has timed out. %{documentationLink}"
msgstr ""
......@@ -6892,9 +6889,6 @@ msgstr ""
msgid "Checking branch availability..."
msgstr ""
msgid "Checking group URL availability..."
msgstr ""
msgid "Checking group path availability..."
msgstr ""
......@@ -16841,9 +16835,6 @@ msgstr ""
msgid "Group Hooks"
msgstr ""
msgid "Group ID"
msgstr ""
msgid "Group Owner must have signed in with SAML before enabling Group Managed Accounts"
msgstr ""
......@@ -16871,9 +16862,6 @@ msgstr ""
msgid "Group by"
msgstr ""
msgid "Group description"
msgstr ""
msgid "Group description (optional)"
msgstr ""
......@@ -17288,6 +17276,9 @@ msgstr ""
msgid "GroupSettings|Changing a group's URL can have unintended side effects."
msgstr ""
msgid "GroupSettings|Choose a group path that does not start with a dash or end with a period. It can also contain alphanumeric characters and underscores."
msgstr ""
msgid "GroupSettings|Compliance frameworks"
msgstr ""
......@@ -17570,6 +17561,54 @@ msgstr ""
msgid "GroupsTree|Search by name"
msgstr ""
msgid "Groups|Avatar will be removed. Are you sure?"
msgstr ""
msgid "Groups|Changing group URL can have unintended side effects."
msgstr ""
msgid "Groups|Checking group URL availability..."
msgstr ""
msgid "Groups|Enter a descriptive name for your group."
msgstr ""
msgid "Groups|Group ID"
msgstr ""
msgid "Groups|Group URL"
msgstr ""
msgid "Groups|Group avatar"
msgstr ""
msgid "Groups|Group description"
msgstr ""
msgid "Groups|Group name"
msgstr ""
msgid "Groups|Group path is available."
msgstr ""
msgid "Groups|Group path is unavailable. Path has been replaced with a suggested available path."
msgstr ""
msgid "Groups|Learn more"
msgstr ""
msgid "Groups|Must start with letter, digit, emoji, or underscore. Can also contain periods, dashes, spaces, and parentheses."
msgstr ""
msgid "Groups|Optional group description."
msgstr ""
msgid "Groups|Remove avatar"
msgstr ""
msgid "Groups|Save changes"
msgstr ""
msgid "Guideline"
msgstr ""
......@@ -23449,7 +23488,7 @@ msgstr ""
msgid "Must match with the %{codeStart}geo_node_name%{codeEnd} in %{codeStart}/etc/gitlab/gitlab.rb%{codeEnd}. %{linkStart}Learn more%{linkEnd}"
msgstr ""
msgid "My Awesome Group"
msgid "My awesome group"
msgstr ""
msgid "My company or team"
......@@ -25199,9 +25238,6 @@ msgstr ""
msgid "Optional parameter \"variables\" must be a Hash. Ex: variables[key1]=value1"
msgstr ""
msgid "Optional."
msgstr ""
msgid "Optionally, you can %{link_to_customize} how FogBugz email addresses and usernames are imported into GitLab."
msgstr ""
......
......@@ -52,7 +52,7 @@ RSpec.describe 'Group' do
click_button 'Create group'
expect(current_path).to eq(new_group_path)
expect(page).to have_text('Please choose a group URL with no special characters or spaces.')
expect(page).to have_text('Choose a group path that does not start with a dash or end with a period. It can also contain alphanumeric characters and underscores.')
end
end
......@@ -90,7 +90,7 @@ RSpec.describe 'Group' do
fill_in 'group_path', with: user.username
wait_for_requests
expect(page).to have_content("Group path is already taken. We've suggested one that is available.")
expect(page).to have_content("Group path is unavailable. Path has been replaced with a suggested available path.")
end
it 'does not break after an invalid form submit' do
......@@ -279,7 +279,7 @@ RSpec.describe 'Group' do
fill_in 'Group URL', with: subgroup.path
wait_for_requests
expect(page).to have_content("Group path is already taken. We've suggested one that is available.")
expect(page).to have_content("Group path is unavailable. Path has been replaced with a suggested available path.")
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment