Commit 61b8062a authored by Dmytro Zaporozhets (DZ)'s avatar Dmytro Zaporozhets (DZ)

Merge branch '233449-aqualls-enCAPSulate' into 'master'

Revise the navbar to use sentence case

See merge request gitlab-org/gitlab!60324
parents 542e8c90 9e677ac0
- navbar_links = links.sort_by(&:title)
- all_paths = navbar_links.map(&:path)
- analytics_link = navbar_links.find { |link| link.title == _('Value Stream') } || navbar_links.first
- analytics_link = navbar_links.find { |link| link.title == _('Value stream') } || navbar_links.first
- if navbar_links.any?
= nav_link(path: all_paths) do
......
......@@ -28,7 +28,7 @@ module EE
return unless group_sidebar_link?(:merge_request_analytics) # rubocop: disable Lint/UnreachableCode
navbar_sub_item(
title: _('Merge Request'),
title: _('Merge request'),
path: 'groups/analytics/merge_request_analytics#show',
link: group_analytics_merge_request_analytics_path(group)
)
......@@ -38,7 +38,7 @@ module EE
return unless group_sidebar_link?(:cycle_analytics)
navbar_sub_item(
title: _('Value Stream'),
title: _('Value stream'),
path: 'groups/analytics/cycle_analytics#show',
link: group_analytics_cycle_analytics_path(group)
)
......@@ -48,7 +48,7 @@ module EE
return unless group_sidebar_link?(:group_devops_adoption)
navbar_sub_item(
title: _('DevOps Adoption'),
title: _('DevOps adoption'),
path: 'groups/analytics/devops_adoption#show',
link: group_analytics_devops_adoption_path(group)
)
......
......@@ -44,7 +44,7 @@ module EE
end
::Sidebars::MenuItem.new(
title: _('Code Review'),
title: _('Code review'),
link: project_analytics_code_reviews_path(context.project),
active_routes: { path: 'projects/analytics/code_reviews#index' },
item_id: :code_review
......@@ -76,7 +76,7 @@ module EE
end
::Sidebars::MenuItem.new(
title: _('Merge Request'),
title: _('Merge request'),
link: project_analytics_merge_request_analytics_path(context.project),
active_routes: { path: 'projects/analytics/merge_request_analytics#show' },
item_id: :merge_requests
......
......@@ -52,7 +52,7 @@ RSpec.describe Projects::Analytics::MergeRequestAnalyticsController do
end
it 'renders the side navigation with the correct submenu set as active' do
expect(response.body).to have_active_sub_navigation('Merge Request')
expect(response.body).to have_active_sub_navigation('Merge request')
end
end
end
......
......@@ -28,7 +28,7 @@ RSpec.describe 'Group navbar' do
insert_after_sub_nav_item(
_('Contribution'),
within: _('Analytics'),
new_sub_nav_item_name: _('DevOps Adoption')
new_sub_nav_item_name: _('DevOps adoption')
)
visit group_path(group)
......@@ -60,7 +60,7 @@ RSpec.describe 'Group navbar' do
insert_after_sub_nav_item(
_('Contribution'),
within: _('Analytics'),
new_sub_nav_item_name: _('Value Stream')
new_sub_nav_item_name: _('Value stream')
)
visit group_path(group)
......
......@@ -30,7 +30,7 @@ RSpec.describe 'Project active tab' do
end
it_behaves_like 'page has active tab', _('Analytics')
it_behaves_like 'page has active sub tab', _('Code Review')
it_behaves_like 'page has active sub tab', _('Code review')
end
context 'on project CI/CD' do
......
......@@ -23,7 +23,7 @@ RSpec.describe 'Project navbar' do
stub_licensed_features(issues_analytics: true)
insert_after_sub_nav_item(
_('Code Review'),
_('Code review'),
within: _('Analytics'),
new_sub_nav_item_name: _('Issue')
)
......
......@@ -93,7 +93,7 @@ RSpec.describe 'layouts/nav/sidebar/_group' do
it 'is visible' do
render
expect(rendered).to have_text 'DevOps Adoption'
expect(rendered).to have_text 'DevOps adoption'
end
end
......@@ -105,7 +105,7 @@ RSpec.describe 'layouts/nav/sidebar/_group' do
it 'is not visible' do
render
expect(rendered).not_to have_text 'DevOps Adoption'
expect(rendered).not_to have_text 'DevOps adoption'
end
end
end
......
......@@ -282,7 +282,7 @@ RSpec.describe 'layouts/nav/sidebar/_project' do
it 'has a link to the Code Review analytics page' do
render
expect(rendered).to have_link('Code Review', href: project_analytics_code_reviews_path(project))
expect(rendered).to have_link('Code review', href: project_analytics_code_reviews_path(project))
end
context 'when user does not have access' do
......@@ -291,7 +291,7 @@ RSpec.describe 'layouts/nav/sidebar/_project' do
it 'does not have a link to the Code Review analytics page' do
render
expect(rendered).not_to have_link('Code Review', href: project_analytics_code_reviews_path(project))
expect(rendered).not_to have_link('Code review', href: project_analytics_code_reviews_path(project))
end
end
end
......@@ -340,7 +340,7 @@ RSpec.describe 'layouts/nav/sidebar/_project' do
end
end
describe 'Merge Request' do
describe 'Merge request' do
before do
stub_licensed_features(project_merge_request_analytics: true)
end
......@@ -348,7 +348,7 @@ RSpec.describe 'layouts/nav/sidebar/_project' do
it 'has a link to the merge request analytics page' do
render
expect(rendered).to have_link('Merge Request', href: project_analytics_merge_request_analytics_path(project))
expect(rendered).to have_link('Merge request', href: project_analytics_merge_request_analytics_path(project))
end
context 'when user does not have access' do
......@@ -357,7 +357,7 @@ RSpec.describe 'layouts/nav/sidebar/_project' do
it 'does not have a link to the merge request analytics page' do
render
expect(rendered).not_to have_link('Merge Request', href: project_analytics_merge_request_analytics_path(project))
expect(rendered).not_to have_link('Merge request', href: project_analytics_merge_request_analytics_path(project))
end
end
end
......
......@@ -79,7 +79,7 @@ module Sidebars
end
::Sidebars::MenuItem.new(
title: _('Value Stream'),
title: _('Value stream'),
link: project_cycle_analytics_path(context.project),
container_html_options: { class: 'shortcuts-project-cycle-analytics' },
active_routes: { path: 'cycle_analytics#show' },
......
......@@ -7741,6 +7741,9 @@ msgstr ""
msgid "Code owners"
msgstr ""
msgid "Code review"
msgstr ""
msgid "Code snippet copied. Insert it in the correct location in the YAML file."
msgstr ""
......@@ -11069,6 +11072,9 @@ msgstr ""
msgid "DevOps Report"
msgstr ""
msgid "DevOps adoption"
msgstr ""
msgid "DevopsAdoption|Add Group"
msgstr ""
......@@ -35673,9 +35679,6 @@ msgstr ""
msgid "Value"
msgstr ""
msgid "Value Stream"
msgstr ""
msgid "Value Stream Analytics"
msgstr ""
......@@ -35685,6 +35688,9 @@ msgstr ""
msgid "Value Stream Analytics gives an overview of how much time it takes to go from idea to production in your project."
msgstr ""
msgid "Value stream"
msgstr ""
msgid "ValueStreamAnalyticsStage|We don't have enough data to show this stage."
msgstr ""
......
......@@ -138,9 +138,9 @@ RSpec.describe 'Project active tab' do
visit project_cycle_analytics_path(project)
end
context 'on project Analytics/Value Stream Analytics' do
context 'on project Analytics/Value stream Analytics' do
it_behaves_like 'page has active tab', _('Analytics')
it_behaves_like 'page has active sub tab', _('Value Stream')
it_behaves_like 'page has active sub tab', _('Value stream')
end
context 'on project Analytics/"CI/CD"' do
......
......@@ -95,10 +95,10 @@ RSpec.shared_context 'project navbar structure' do
nav_item: _('Analytics'),
nav_sub_items: [
_('CI/CD'),
(_('Code Review') if Gitlab.ee?),
(_('Merge Request') if Gitlab.ee?),
(_('Code review') if Gitlab.ee?),
(_('Merge request') if Gitlab.ee?),
_('Repository'),
_('Value Stream')
_('Value stream')
]
},
{
......
......@@ -695,11 +695,11 @@ RSpec.describe 'layouts/nav/sidebar/_project' do
end
end
describe 'Value Stream' do
describe 'Value stream' do
it 'has a link to the value stream page' do
render
expect(rendered).to have_link('Value Stream', href: project_cycle_analytics_path(project))
expect(rendered).to have_link('Value stream', href: project_cycle_analytics_path(project))
end
context 'when user does not have access' do
......@@ -708,7 +708,7 @@ RSpec.describe 'layouts/nav/sidebar/_project' do
it 'does not have a link to the value stream page' do
render
expect(rendered).not_to have_link('Value Stream', href: project_cycle_analytics_path(project))
expect(rendered).not_to have_link('Value stream', href: project_cycle_analytics_path(project))
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