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