Skip to content

Remove profile activity heading on empty state

Problem to solve

Following the changes in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24549, profile activity heading on empty state could be removed.

Proposal

Current Proposed
activity-before activity-after

Possible fix

diff --git a/app/views/events/_events.html.haml b/app/views/events/_events.html.haml
index e1b7804c5a7..615d3b58363 100644
--- a/app/views/events/_events.html.haml
+++ b/app/views/events/_events.html.haml
@@ -7,6 +7,8 @@
 - visitor_empty_message = _('No activities found')
 
 - if @events.present?
+  %h4.prepend-top-20
+    = s_('UserProfile|Most Recent Activity')
   = render partial: 'events/event', collection: @events
 - else
   = render partial: 'shared/empty_states/profile_tabs', locals: { illustration_path: illustration_path,
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 211e3eafac6..0d05d49d797 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -125,8 +125,6 @@
       - if profile_tab?(:activity)
         #activity.tab-pane
           - if can?(current_user, :read_cross_project)
-            %h4.prepend-top-20
-              = s_('UserProfile|Most Recent Activity')
             .content_list{ data: { href: user_path } }
             = spinner