Commit 3f63ffaf authored by Martin Wortschack's avatar Martin Wortschack

Merge branch '208455-remove-analytics-suffixes-from-analytics-sidebar-menu-items' into 'master'

Remove "Analytics" suffixes from Analytics sidebar menu items

Closes #208455

See merge request gitlab-org/gitlab!26415
parents dba931c6 61cb58c4
...@@ -35,7 +35,7 @@ module AnalyticsNavbarHelper ...@@ -35,7 +35,7 @@ module AnalyticsNavbarHelper
return unless project_nav_tab?(:cycle_analytics) return unless project_nav_tab?(:cycle_analytics)
navbar_sub_item( navbar_sub_item(
title: _('Value Stream Analytics'), title: _('Value Stream'),
path: 'cycle_analytics#show', path: 'cycle_analytics#show',
link: project_cycle_analytics_path(project), link: project_cycle_analytics_path(project),
link_to_options: { class: 'shortcuts-project-cycle-analytics' } link_to_options: { class: 'shortcuts-project-cycle-analytics' }
...@@ -47,7 +47,7 @@ module AnalyticsNavbarHelper ...@@ -47,7 +47,7 @@ module AnalyticsNavbarHelper
return if project.empty_repo? return if project.empty_repo?
navbar_sub_item( navbar_sub_item(
title: _('Repository Analytics'), title: _('Repository'),
path: 'graphs#charts', path: 'graphs#charts',
link: charts_project_graph_path(project, current_ref), link: charts_project_graph_path(project, current_ref),
link_to_options: { class: 'shortcuts-repository-charts' } link_to_options: { class: 'shortcuts-repository-charts' }
...@@ -60,7 +60,7 @@ module AnalyticsNavbarHelper ...@@ -60,7 +60,7 @@ module AnalyticsNavbarHelper
return unless project.feature_available?(:builds, current_user) || !project.empty_repo? return unless project.feature_available?(:builds, current_user) || !project.empty_repo?
navbar_sub_item( navbar_sub_item(
title: _('CI / CD Analytics'), title: _('CI / CD'),
path: 'pipelines#charts', path: 'pipelines#charts',
link: charts_project_pipelines_path(project) link: charts_project_pipelines_path(project)
) )
......
...@@ -48,9 +48,9 @@ ...@@ -48,9 +48,9 @@
- unless should_display_analytics_pages_in_sidebar - unless should_display_analytics_pages_in_sidebar
- if group_sidebar_link?(:contribution_analytics) - if group_sidebar_link?(:contribution_analytics)
= nav_link(path: 'contribution_analytics#show') do = nav_link(path: 'contribution_analytics#show') do
= link_to group_contribution_analytics_path(@group), title: _('Contribution Analytics'), data: { placement: 'right', qa_selector: 'contribution_analytics_link' } do = link_to group_contribution_analytics_path(@group), title: _('Contribution'), data: { placement: 'right', qa_selector: 'contribution_analytics_link' } do
%span %span
= _('Contribution Analytics') = _('Contribution')
= render_if_exists 'layouts/nav/group_insights_link' = render_if_exists 'layouts/nav/group_insights_link'
......
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
- unless should_display_analytics_pages_in_sidebar - unless should_display_analytics_pages_in_sidebar
- if can?(current_user, :read_cycle_analytics, @project) - if can?(current_user, :read_cycle_analytics, @project)
= nav_link(path: 'cycle_analytics#show') do = nav_link(path: 'cycle_analytics#show') do
= link_to project_cycle_analytics_path(@project), title: _('Value Stream Analytics'), class: 'shortcuts-project-cycle-analytics' do = link_to project_cycle_analytics_path(@project), title: _('Value Stream'), class: 'shortcuts-project-cycle-analytics' do
%span= _('Value Stream Analytics') %span= _('Value Stream')
= render_if_exists 'layouts/nav/project_insights_link' = render_if_exists 'layouts/nav/project_insights_link'
......
---
title: Remove "Analytics" suffix from the sidebar menu items
merge_request: 26415
author:
type: removed
...@@ -31,7 +31,7 @@ module EE ...@@ -31,7 +31,7 @@ module EE
return unless project_nav_tab?(:issues_analytics) return unless project_nav_tab?(:issues_analytics)
navbar_sub_item( navbar_sub_item(
title: _('Issues Analytics'), title: _('Issues'),
path: 'issues_analytics#show', path: 'issues_analytics#show',
link: project_analytics_issues_analytics_path(project) link: project_analytics_issues_analytics_path(project)
) )
...@@ -43,7 +43,7 @@ module EE ...@@ -43,7 +43,7 @@ module EE
return unless group_sidebar_link?(:cycle_analytics) return unless group_sidebar_link?(:cycle_analytics)
navbar_sub_item( navbar_sub_item(
title: _('Value Stream Analytics'), title: _('Value Stream'),
path: 'groups/analytics/cycle_analytics#show', path: 'groups/analytics/cycle_analytics#show',
link: group_analytics_cycle_analytics_path(group) link: group_analytics_cycle_analytics_path(group)
) )
...@@ -55,7 +55,7 @@ module EE ...@@ -55,7 +55,7 @@ module EE
return unless group_sidebar_link?(:productivity_analytics) return unless group_sidebar_link?(:productivity_analytics)
navbar_sub_item( navbar_sub_item(
title: _('Productivity Analytics'), title: _('Productivity'),
path: 'groups/analytics/productivity_analytics#show', path: 'groups/analytics/productivity_analytics#show',
link: group_analytics_productivity_analytics_path(group) link: group_analytics_productivity_analytics_path(group)
) )
...@@ -66,7 +66,7 @@ module EE ...@@ -66,7 +66,7 @@ module EE
return unless group_sidebar_link?(:contribution_analytics) return unless group_sidebar_link?(:contribution_analytics)
navbar_sub_item( navbar_sub_item(
title: _('Contribution Analytics'), title: _('Contribution'),
path: 'groups/contribution_analytics#show', path: 'groups/contribution_analytics#show',
link: group_contribution_analytics_path(group), link: group_contribution_analytics_path(group),
link_to_options: { data: { placement: 'right', qa_selector: 'contribution_analytics_link' } } link_to_options: { data: { placement: 'right', qa_selector: 'contribution_analytics_link' } }
...@@ -90,7 +90,7 @@ module EE ...@@ -90,7 +90,7 @@ module EE
return unless group_sidebar_link?(:analytics) return unless group_sidebar_link?(:analytics)
navbar_sub_item( navbar_sub_item(
title: _('Issues Analytics'), title: _('Issues'),
path: 'issues_analytics#show', path: 'issues_analytics#show',
link: group_issues_analytics_path(group) link: group_issues_analytics_path(group)
) )
......
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
.nav-icon-container .nav-icon-container
= sprite_icon('comment') = sprite_icon('comment')
%span.nav-item-name %span.nav-item-name
= _('Productivity Analytics') = _('Productivity')
%ul.sidebar-sub-level-items.is-fly-out-only %ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: :productivity_analytics, html_options: { class: "fly-out-top-item qa-sidebar-productivity-analytics-fly-out" } ) do = nav_link(controller: :productivity_analytics, html_options: { class: "fly-out-top-item qa-sidebar-productivity-analytics-fly-out" } ) do
= link_to analytics_productivity_analytics_path do = link_to analytics_productivity_analytics_path do
%strong.fly-out-top-item-name %strong.fly-out-top-item-name
= _('Productivity Analytics') = _('Productivity')
- if Feature.disabled?(:group_level_cycle_analytics) && Gitlab::Analytics.cycle_analytics_enabled? - if Feature.disabled?(:group_level_cycle_analytics) && Gitlab::Analytics.cycle_analytics_enabled?
= nav_link(controller: :cycle_analytics) do = nav_link(controller: :cycle_analytics) do
......
...@@ -50,7 +50,7 @@ describe 'Group active tab' do ...@@ -50,7 +50,7 @@ describe 'Group active tab' do
end end
it_behaves_like 'page has active tab', _('Group overview') it_behaves_like 'page has active tab', _('Group overview')
it_behaves_like 'page has active sub tab', _('Contribution Analytics') it_behaves_like 'page has active sub tab', _('Contribution')
end end
end end
...@@ -78,7 +78,7 @@ describe 'Group active tab' do ...@@ -78,7 +78,7 @@ describe 'Group active tab' do
end end
it_behaves_like 'page has active tab', _('Analytics') it_behaves_like 'page has active tab', _('Analytics')
it_behaves_like 'page has active sub tab', _('Issues Analytics') it_behaves_like 'page has active sub tab', _('Issues')
end end
context 'on group Contribution Analytics' do context 'on group Contribution Analytics' do
...@@ -87,7 +87,7 @@ describe 'Group active tab' do ...@@ -87,7 +87,7 @@ describe 'Group active tab' do
end end
it_behaves_like 'page has active tab', _('Analytics') it_behaves_like 'page has active tab', _('Analytics')
it_behaves_like 'page has active sub tab', _('Contribution Analytics') it_behaves_like 'page has active sub tab', _('Contribution')
end end
context 'on group Productivity Analytics' do context 'on group Productivity Analytics' do
...@@ -98,7 +98,7 @@ describe 'Group active tab' do ...@@ -98,7 +98,7 @@ describe 'Group active tab' do
end end
it_behaves_like 'page has active tab', _('Analytics') it_behaves_like 'page has active tab', _('Analytics')
it_behaves_like 'page has active sub tab', _('Productivity Analytics') it_behaves_like 'page has active sub tab', _('Productivity')
end end
end end
end end
...@@ -18,7 +18,7 @@ describe 'Groups > Contribution Analytics', :js do ...@@ -18,7 +18,7 @@ describe 'Groups > Contribution Analytics', :js do
it 'displays Contribution Analytics' do it 'displays Contribution Analytics' do
visit group_path(group) visit group_path(group)
find('a', text: 'Contribution Analytics').click find('a', text: 'Contribution').click
expect(page).to have_content "Contribution analytics for issues, merge requests and push" expect(page).to have_content "Contribution analytics for issues, merge requests and push"
end end
......
...@@ -18,7 +18,7 @@ describe 'The group page' do ...@@ -18,7 +18,7 @@ describe 'The group page' do
visit group_path(group) visit group_path(group)
within('.nav-sidebar') do within('.nav-sidebar') do
expect(page).to have_link('Contribution Analytics') expect(page).to have_link('Contribution')
end end
end end
......
...@@ -24,22 +24,22 @@ describe 'layouts/nav/sidebar/_analytics' do ...@@ -24,22 +24,22 @@ describe 'layouts/nav/sidebar/_analytics' do
expect(rendered).to match(/<use xlink:href=".+?icons-.+?#chart">/) expect(rendered).to match(/<use xlink:href=".+?icons-.+?#chart">/)
end end
it 'has `Productivity Analytics` link' do it 'has `Productivity` link' do
stub_feature_flags(Gitlab::Analytics::PRODUCTIVITY_ANALYTICS_FEATURE_FLAG => true) stub_feature_flags(Gitlab::Analytics::PRODUCTIVITY_ANALYTICS_FEATURE_FLAG => true)
render render
expect(rendered).to have_content('Productivity Analytics') expect(rendered).to have_content('Productivity')
expect(rendered).to include(analytics_productivity_analytics_path) expect(rendered).to include(analytics_productivity_analytics_path)
expect(rendered).to match(/<use xlink:href=".+?icons-.+?#comment">/) expect(rendered).to match(/<use xlink:href=".+?icons-.+?#comment">/)
end end
it 'has `Value Stream Analytics` link' do it 'has `Value Stream` link' do
stub_feature_flags(Gitlab::Analytics::CYCLE_ANALYTICS_FEATURE_FLAG => true) stub_feature_flags(Gitlab::Analytics::CYCLE_ANALYTICS_FEATURE_FLAG => true)
render render
expect(rendered).to have_content('Value Stream Analytics') expect(rendered).to have_content('Value Stream')
expect(rendered).to include(analytics_cycle_analytics_path) expect(rendered).to include(analytics_cycle_analytics_path)
expect(rendered).to match(/<use xlink:href=".+?icons-.+?#repeat">/) expect(rendered).to match(/<use xlink:href=".+?icons-.+?#repeat">/)
end end
...@@ -84,8 +84,8 @@ describe 'layouts/nav/sidebar/_analytics' do ...@@ -84,8 +84,8 @@ describe 'layouts/nav/sidebar/_analytics' do
it 'no analytics links are rendered' do it 'no analytics links are rendered' do
disable_all_analytics_feature_flags disable_all_analytics_feature_flags
expect(rendered).not_to have_content('Productivity Analytics') expect(rendered).not_to have_content('Productivity')
expect(rendered).not_to have_content('Value Stream Analytics') expect(rendered).not_to have_content('Value Stream')
end end
context 'and user has access to instance statistics features' do context 'and user has access to instance statistics features' do
......
...@@ -27,7 +27,7 @@ describe 'layouts/nav/sidebar/_group' do ...@@ -27,7 +27,7 @@ describe 'layouts/nav/sidebar/_group' do
it 'is visible' do it 'is visible' do
render render
expect(rendered).to have_text 'Contribution Analytics' expect(rendered).to have_text 'Contribution'
end end
end end
...@@ -44,7 +44,7 @@ describe 'layouts/nav/sidebar/_group' do ...@@ -44,7 +44,7 @@ describe 'layouts/nav/sidebar/_group' do
it 'is not visible' do it 'is not visible' do
render render
expect(rendered).not_to have_text 'Contribution Analytics' expect(rendered).not_to have_text 'Contribution'
end end
end end
end end
...@@ -62,7 +62,7 @@ describe 'layouts/nav/sidebar/_group' do ...@@ -62,7 +62,7 @@ describe 'layouts/nav/sidebar/_group' do
render render
expect(rendered).to have_text 'Contribution Analytics' expect(rendered).to have_text 'Contribution'
end end
end end
...@@ -71,7 +71,7 @@ describe 'layouts/nav/sidebar/_group' do ...@@ -71,7 +71,7 @@ describe 'layouts/nav/sidebar/_group' do
render render
expect(rendered).to have_text 'Contribution Analytics' expect(rendered).to have_text 'Contribution'
end end
describe 'group issue boards link' do describe 'group issue boards link' do
......
...@@ -3133,9 +3133,6 @@ msgstr "" ...@@ -3133,9 +3133,6 @@ msgstr ""
msgid "CI / CD" msgid "CI / CD"
msgstr "" msgstr ""
msgid "CI / CD Analytics"
msgstr ""
msgid "CI / CD Charts" msgid "CI / CD Charts"
msgstr "" msgstr ""
...@@ -14552,6 +14549,9 @@ msgstr "" ...@@ -14552,6 +14549,9 @@ msgstr ""
msgid "Proceed" msgid "Proceed"
msgstr "" msgstr ""
msgid "Productivity"
msgstr ""
msgid "Productivity Analytics" msgid "Productivity Analytics"
msgstr "" msgstr ""
...@@ -16431,9 +16431,6 @@ msgstr "" ...@@ -16431,9 +16431,6 @@ msgstr ""
msgid "Repository" msgid "Repository"
msgstr "" msgstr ""
msgid "Repository Analytics"
msgstr ""
msgid "Repository Graph" msgid "Repository Graph"
msgstr "" msgstr ""
...@@ -21740,6 +21737,9 @@ msgstr "" ...@@ -21740,6 +21737,9 @@ msgstr ""
msgid "Value" msgid "Value"
msgstr "" msgstr ""
msgid "Value Stream"
msgstr ""
msgid "Value Stream Analytics" msgid "Value Stream Analytics"
msgstr "" msgstr ""
......
...@@ -47,7 +47,7 @@ describe 'The group page' do ...@@ -47,7 +47,7 @@ describe 'The group page' do
expect(page).to have_link('Group overview') expect(page).to have_link('Group overview')
expect(page).to have_link('Details') expect(page).to have_link('Details')
expect(page).not_to have_link('Activity') expect(page).not_to have_link('Activity')
expect(page).not_to have_link('Contribution Analytics') expect(page).not_to have_link('Contribution')
expect(page).not_to have_link('Issues') expect(page).not_to have_link('Issues')
expect(page).not_to have_link('Merge Requests') expect(page).not_to have_link('Merge Requests')
......
...@@ -10,7 +10,7 @@ describe 'Group navbar' do ...@@ -10,7 +10,7 @@ describe 'Group navbar' do
{ {
nav_item: _('Analytics'), nav_item: _('Analytics'),
nav_sub_items: [ nav_sub_items: [
_('Contribution Analytics') _('Contribution')
] ]
} }
end end
...@@ -63,7 +63,7 @@ describe 'Group navbar' do ...@@ -63,7 +63,7 @@ describe 'Group navbar' do
before do before do
stub_licensed_features(productivity_analytics: true) stub_licensed_features(productivity_analytics: true)
analytics_nav_item[:nav_sub_items] << _('Productivity Analytics') analytics_nav_item[:nav_sub_items] << _('Productivity')
group.add_maintainer(user) group.add_maintainer(user)
sign_in(user) sign_in(user)
...@@ -78,7 +78,7 @@ describe 'Group navbar' do ...@@ -78,7 +78,7 @@ describe 'Group navbar' do
before do before do
stub_licensed_features(cycle_analytics_for_groups: true) stub_licensed_features(cycle_analytics_for_groups: true)
analytics_nav_item[:nav_sub_items] << _('Value Stream Analytics') analytics_nav_item[:nav_sub_items] << _('Value Stream')
group.add_maintainer(user) group.add_maintainer(user)
sign_in(user) sign_in(user)
......
...@@ -136,16 +136,16 @@ describe 'Project active tab' do ...@@ -136,16 +136,16 @@ describe 'Project active tab' do
context 'on project Analytics/Repository Analytics' do context 'on project Analytics/Repository Analytics' do
it_behaves_like 'page has active tab', _('Analytics') it_behaves_like 'page has active tab', _('Analytics')
it_behaves_like 'page has active sub tab', _('Repository Analytics') it_behaves_like 'page has active sub tab', _('Repository')
end end
context 'on project Analytics/Cycle Analytics' do context 'on project Analytics/Cycle Analytics' do
before do before do
click_tab(_('CI / CD Analytics')) click_tab(_('CI / CD'))
end end
it_behaves_like 'page has active tab', _('Analytics') it_behaves_like 'page has active tab', _('Analytics')
it_behaves_like 'page has active sub tab', _('CI / CD Analytics') it_behaves_like 'page has active sub tab', _('CI / CD')
end end
end end
end end
......
...@@ -10,10 +10,10 @@ describe 'Project navbar' do ...@@ -10,10 +10,10 @@ describe 'Project navbar' do
{ {
nav_item: _('Analytics'), nav_item: _('Analytics'),
nav_sub_items: [ nav_sub_items: [
_('CI / CD Analytics'), _('CI / CD'),
(_('Code Review') if Gitlab.ee?), (_('Code Review') if Gitlab.ee?),
_('Repository Analytics'), _('Repository'),
_('Value Stream Analytics') _('Value Stream')
] ]
} }
end end
...@@ -114,7 +114,7 @@ describe 'Project navbar' do ...@@ -114,7 +114,7 @@ describe 'Project navbar' do
before do before do
stub_licensed_features(issues_analytics: true) stub_licensed_features(issues_analytics: true)
analytics_nav_item[:nav_sub_items] << _('Issues Analytics') analytics_nav_item[:nav_sub_items] << _('Issues')
analytics_nav_item[:nav_sub_items].sort! analytics_nav_item[:nav_sub_items].sort!
visit project_path(project) visit project_path(project)
......
...@@ -222,7 +222,7 @@ describe 'User uses shortcuts', :js do ...@@ -222,7 +222,7 @@ describe 'User uses shortcuts', :js do
find('body').native.send_key('d') find('body').native.send_key('d')
expect(page).to have_active_navigation(_('Analytics')) expect(page).to have_active_navigation(_('Analytics'))
expect(page).to have_active_sub_navigation(_('Repository Analytics')) expect(page).to have_active_sub_navigation(_('Repository'))
end end
end end
end end
...@@ -173,7 +173,7 @@ describe 'layouts/nav/sidebar/_project' do ...@@ -173,7 +173,7 @@ describe 'layouts/nav/sidebar/_project' do
it 'shows the value stream analytics entry' do it 'shows the value stream analytics entry' do
render render
expect(rendered).to have_link('Value Stream Analytics', href: project_cycle_analytics_path(project)) expect(rendered).to have_link('Value Stream', href: project_cycle_analytics_path(project))
end end
end end
...@@ -183,7 +183,7 @@ describe 'layouts/nav/sidebar/_project' do ...@@ -183,7 +183,7 @@ describe 'layouts/nav/sidebar/_project' do
it 'does not show the value stream analytics entry' do it 'does not show the value stream analytics entry' do
render render
expect(rendered).not_to have_link('Value Stream Analytics', href: project_cycle_analytics_path(project)) expect(rendered).not_to have_link('Value Stream', href: project_cycle_analytics_path(project))
end end
end 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