Commit c7627b8c authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'remove_epic_count' into 'master'

Remove epic count from roadmap show page

See merge request gitlab-org/gitlab!51610
parents f37b7aee 1fd870cd
...@@ -19,7 +19,6 @@ module Groups ...@@ -19,7 +19,6 @@ module Groups
# Used to persist the order and show the correct sorting dropdown on UI. # Used to persist the order and show the correct sorting dropdown on UI.
@sort = set_sort_order @sort = set_sort_order
@epics_state = epics_state_in_user_preference || 'all' @epics_state = epics_state_in_user_preference || 'all'
@epics_count = EpicsFinder.new(current_user, group_id: @group.id).execute.count
end end
private private
......
...@@ -12,22 +12,18 @@ ...@@ -12,22 +12,18 @@
- has_filters_applied = params[:label_name].present? || params[:author_username].present? || params[:search].present? - 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)
- 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
= 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), #js-roadmap{ data: { epics_path: group_epics_path(@group, format: :json),
group_id: @group.id, group_id: @group.id,
full_path: @group.full_path, full_path: @group.full_path,
empty_state_illustration: image_path('illustrations/epics/roadmap.svg'), empty_state_illustration: image_path('illustrations/epics/roadmap.svg'),
has_filters_applied: "#{has_filters_applied}", has_filters_applied: "#{has_filters_applied}",
new_epic_endpoint: group_epics_path(@group), new_epic_endpoint: group_epics_path(@group),
group_labels_endpoint: group_labels_path(@group, format: :json), group_labels_endpoint: group_labels_path(@group, format: :json),
group_milestones_endpoint: group_milestones_path(@group, format: :json), group_milestones_endpoint: group_milestones_path(@group, format: :json),
preset_type: roadmap_layout, preset_type: roadmap_layout,
epics_state: @epics_state, epics_state: @epics_state,
sorted_by: @sort, sorted_by: @sort,
allow_sub_epics: allow_sub_epics } } allow_sub_epics: allow_sub_epics } }
- else
= render 'shared/empty_states/roadmap'
.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 ...@@ -145,12 +145,13 @@ RSpec.describe 'group epic roadmap', :js do
context 'when no epics exist for the group' do context 'when no epics exist for the group' do
before do before do
visit group_roadmap_path(group) visit group_roadmap_path(group)
wait_for_requests
end end
describe 'roadmap page' do describe 'roadmap page' do
it 'does not render the filtered search bar' do it 'shows empty state page' do
page.within('.content-wrapper .content') do page.within('.empty-state') do
expect(page).not_to have_css('.epics-filters') expect(page).to have_content('The roadmap shows the progress of your epics along a timeline')
end end
end end
end end
......
...@@ -28325,9 +28325,6 @@ msgstr "" ...@@ -28325,9 +28325,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." 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 "" 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)." 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 "" msgstr ""
...@@ -29757,9 +29754,6 @@ msgstr "" ...@@ -29757,9 +29754,6 @@ msgstr ""
msgid "To view instance-level analytics, ask an admin to turn on %{docLinkStart}usage ping%{docLinkEnd}." msgid "To view instance-level analytics, ask an admin to turn on %{docLinkStart}usage ping%{docLinkEnd}."
msgstr "" 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" msgid "To widen your search, change or remove filters above"
msgstr "" 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