Commit ebc18b45 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'ce-mw-onboarding-tour-skeleton' into 'master'

(CE Port) New user onboarding (Skeleton)

See merge request gitlab-org/gitlab-ce!28753
parents 54cc3b64 dab00e69
...@@ -6,18 +6,14 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController ...@@ -6,18 +6,14 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
prepend_before_action(only: [:index]) { authenticate_sessionless_user!(:rss) } prepend_before_action(only: [:index]) { authenticate_sessionless_user!(:rss) }
before_action :set_non_archived_param before_action :set_non_archived_param
before_action :projects, only: [:index]
before_action :default_sorting before_action :default_sorting
skip_cross_project_access_check :index, :starred skip_cross_project_access_check :index, :starred
def index def index
@projects = load_projects(params.merge(non_public: true))
respond_to do |format| respond_to do |format|
format.html do format.html do
# n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/40260 render_projects
Gitlab::GitalyClient.allow_n_plus_1_calls do
render
end
end end
format.atom do format.atom do
load_events load_events
...@@ -51,6 +47,17 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController ...@@ -51,6 +47,17 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
private private
def projects
@projects ||= load_projects(params.merge(non_public: true))
end
def render_projects
# n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/40260
Gitlab::GitalyClient.allow_n_plus_1_calls do
render
end
end
def default_sorting def default_sorting
params[:sort] ||= 'latest_activity_desc' params[:sort] ||= 'latest_activity_desc'
@sort = params[:sort] @sort = params[:sort]
......
...@@ -241,6 +241,7 @@ module ProjectsHelper ...@@ -241,6 +241,7 @@ module ProjectsHelper
# TODO: Remove this method when removing the feature flag # TODO: Remove this method when removing the feature flag
# https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/11209#note_162234863 # https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/11209#note_162234863
# make sure to remove from the EE specific controller as well: ee/app/controllers/ee/dashboard/projects_controller.rb
def show_projects?(projects, params) def show_projects?(projects, params)
Feature.enabled?(:project_list_filter_bar) || !!(params[:personal] || params[:name] || any_projects?(projects)) Feature.enabled?(:project_list_filter_bar) || !!(params[:personal] || params[:name] || any_projects?(projects))
end end
......
...@@ -10,4 +10,6 @@ ...@@ -10,4 +10,6 @@
= render 'layouts/page', sidebar: sidebar, nav: nav = render 'layouts/page', sidebar: sidebar, nav: nav
= footer_message = footer_message
= render_if_exists "shared/onboarding_guide"
= yield :scripts_body = yield :scripts_body
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