Commit 1fd870cd authored by Jan Provaznik's avatar Jan Provaznik

Remove epic count from roadmap show page

The empty list is handled by frontend.
parent b9b786d6
......@@ -19,7 +19,6 @@ module Groups
# Used to persist the order and show the correct sorting dropdown on UI.
@sort = set_sort_order
@epics_state = epics_state_in_user_preference || 'all'
@epics_count = EpicsFinder.new(current_user, group_id: @group.id).execute.count
end
private
......
......@@ -12,22 +12,18 @@
- has_filters_applied = params[:label_name].present? || params[:author_username].present? || params[:search].present?
- if @epics_count != 0
- if !Feature.enabled?(:async_filtering, @group, default_enabled: true)
= render 'shared/epic/search_bar', type: :epics, show_roadmap_presets: true, hide_extra_sort_options: true
- if !Feature.enabled?(:async_filtering, @group, default_enabled: true)
= render 'shared/epic/search_bar', type: :epics, show_roadmap_presets: true, hide_extra_sort_options: true
#js-roadmap{ data: { epics_path: group_epics_path(@group, format: :json),
group_id: @group.id,
full_path: @group.full_path,
empty_state_illustration: image_path('illustrations/epics/roadmap.svg'),
has_filters_applied: "#{has_filters_applied}",
new_epic_endpoint: group_epics_path(@group),
group_labels_endpoint: group_labels_path(@group, format: :json),
group_milestones_endpoint: group_milestones_path(@group, format: :json),
preset_type: roadmap_layout,
epics_state: @epics_state,
sorted_by: @sort,
allow_sub_epics: allow_sub_epics } }
- else
= render 'shared/empty_states/roadmap'
#js-roadmap{ data: { epics_path: group_epics_path(@group, format: :json),
group_id: @group.id,
full_path: @group.full_path,
empty_state_illustration: image_path('illustrations/epics/roadmap.svg'),
has_filters_applied: "#{has_filters_applied}",
new_epic_endpoint: group_epics_path(@group),
group_labels_endpoint: group_labels_path(@group, format: :json),
group_milestones_endpoint: group_milestones_path(@group, format: :json),
preset_type: roadmap_layout,
epics_state: @epics_state,
sorted_by: @sort,
allow_sub_epics: allow_sub_epics } }
.row.empty-state
.col-12
.svg-content
= image_tag 'illustrations/epics/roadmap.svg'
.col-12
.text-content
%h4
= _('The roadmap shows the progress of your epics along a timeline')
%p
= _('To view the roadmap, add a start or due date to one of your epics in this group or its subgroups. In the months view, only epics in the past month, current month, and next 5 months are shown.')
.text-center
- if can?(current_user, :create_epic, @group)
#epic-create-root{ data: { endpoint: request.url } }
= link_to group_epics_path(@group), title: 'List', class: 'btn' do
%span= _('View epics list')
---
title: Speed up roadmap show page by removing an extra epic count check
merge_request: 51610
author:
type: performance
......@@ -145,12 +145,13 @@ RSpec.describe 'group epic roadmap', :js do
context 'when no epics exist for the group' do
before do
visit group_roadmap_path(group)
wait_for_requests
end
describe 'roadmap page' do
it 'does not render the filtered search bar' do
page.within('.content-wrapper .content') do
expect(page).not_to have_css('.epics-filters')
it 'shows empty state page' do
page.within('.empty-state') do
expect(page).to have_content('The roadmap shows the progress of your epics along a timeline')
end
end
end
......
......@@ -28223,9 +28223,6 @@ msgstr ""
msgid "The review stage shows the time from creating the merge request to merging it. The data will automatically be added after you merge your first merge request."
msgstr ""
msgid "The roadmap shows the progress of your epics along a timeline"
msgstr ""
msgid "The same shared runner executes code from multiple projects, unless you configure autoscaling with %{link} set to 1 (which it is on GitLab.com)."
msgstr ""
......@@ -29625,9 +29622,6 @@ msgstr ""
msgid "To view instance-level analytics, ask an admin to turn on %{docLinkStart}usage ping%{docLinkEnd}."
msgstr ""
msgid "To view the roadmap, add a start or due date to one of your epics in this group or its subgroups. In the months view, only epics in the past month, current month, and next 5 months are shown."
msgstr ""
msgid "To widen your search, change or remove filters above"
msgstr ""
......
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