Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 12:55:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 12:55:51 +0300
commite8d2c2579383897a1dd7f9debd359abe8ae8373d (patch)
treec42be41678c2586d49a75cabce89322082698334 /app/views/shared/nav
parentfc845b37ec3a90aaa719975f607740c22ba6a113 (diff)
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'app/views/shared/nav')
-rw-r--r--app/views/shared/nav/_scope_menu.html.haml12
-rw-r--r--app/views/shared/nav/_scope_menu_body.html.haml8
-rw-r--r--app/views/shared/nav/_sidebar.html.haml13
-rw-r--r--app/views/shared/nav/_sidebar_menu.html.haml12
-rw-r--r--app/views/shared/nav/_sidebar_menu_collapsed.html.haml5
5 files changed, 18 insertions, 32 deletions
diff --git a/app/views/shared/nav/_scope_menu.html.haml b/app/views/shared/nav/_scope_menu.html.haml
index cbee0e0429c..1a7089fb570 100644
--- a/app/views/shared/nav/_scope_menu.html.haml
+++ b/app/views/shared/nav/_scope_menu.html.haml
@@ -1,6 +1,6 @@
-- if sidebar_refactor_enabled?
- = nav_link(**scope_menu.active_routes, html_options: scope_menu.nav_link_html_options) do
- = render 'shared/nav/scope_menu_body', scope_menu: scope_menu
-- else
- .context-header
- = render 'shared/nav/scope_menu_body', scope_menu: scope_menu
+= nav_link(**scope_menu.active_routes, html_options: scope_menu.nav_link_html_options) do
+ = link_to scope_menu.link, **scope_menu.container_html_options, data: { qa_selector: 'sidebar_menu_link', qa_menu_item: scope_qa_menu_item(scope_menu.container) } do
+ %span{ class: scope_avatar_classes(scope_menu.container) }
+ = source_icon(scope_menu.container, alt: scope_menu.title, class: ['avatar', 'avatar-tile', 's32'], width: 32, height: 32)
+ %span.sidebar-context-title
+ = scope_menu.title
diff --git a/app/views/shared/nav/_scope_menu_body.html.haml b/app/views/shared/nav/_scope_menu_body.html.haml
deleted file mode 100644
index a94c681e2d3..00000000000
--- a/app/views/shared/nav/_scope_menu_body.html.haml
+++ /dev/null
@@ -1,8 +0,0 @@
-- avatar_size = sidebar_refactor_disabled? ? 40 : 32
-- avatar_size_class = sidebar_refactor_disabled? ? 's40' : 's32'
-
-= link_to scope_menu.link, **scope_menu.container_html_options, data: { qa_selector: 'project_scope_link' } do
- %span{ class: ['avatar-container', 'rect-avatar', 'project-avatar', avatar_size_class] }
- = source_icon(scope_menu.container, alt: scope_menu.title, class: ['avatar', 'avatar-tile', avatar_size_class], width: avatar_size, height: avatar_size)
- %span.sidebar-context-title
- = scope_menu.title
diff --git a/app/views/shared/nav/_sidebar.html.haml b/app/views/shared/nav/_sidebar.html.haml
index 54c3b8a281d..915352996d9 100644
--- a/app/views/shared/nav/_sidebar.html.haml
+++ b/app/views/shared/nav/_sidebar.html.haml
@@ -1,15 +1,14 @@
%aside.nav-sidebar{ class: ('sidebar-collapsed-desktop' if collapsed_sidebar?), **sidebar_tracking_attributes_by_object(sidebar.container), 'aria-label': sidebar.aria_label }
.nav-sidebar-inner-scroll
- - if sidebar.scope_menu && sidebar_refactor_disabled?
- = render partial: 'shared/nav/scope_menu', object: sidebar.scope_menu
- - elsif sidebar.render_raw_scope_menu_partial
- = render sidebar.render_raw_scope_menu_partial
-
- %ul.sidebar-top-level-items.qa-project-sidebar
- - if sidebar.scope_menu && sidebar_refactor_enabled?
+ %ul.sidebar-top-level-items{ data: { qa_selector: sidebar_qa_selector(sidebar.container) } }
+ - if sidebar.render_raw_scope_menu_partial
+ = render sidebar.render_raw_scope_menu_partial
+ - elsif sidebar.scope_menu
= render partial: 'shared/nav/scope_menu', object: sidebar.scope_menu
+
- if sidebar.renderable_menus.any?
= render partial: 'shared/nav/sidebar_menu', collection: sidebar.renderable_menus
+
- if sidebar.render_raw_menus_partial
= render sidebar.render_raw_menus_partial
diff --git a/app/views/shared/nav/_sidebar_menu.html.haml b/app/views/shared/nav/_sidebar_menu.html.haml
index b80bd515a32..9a04139d2f2 100644
--- a/app/views/shared/nav/_sidebar_menu.html.haml
+++ b/app/views/shared/nav/_sidebar_menu.html.haml
@@ -15,12 +15,12 @@
%ul.sidebar-sub-level-items{ class: ('is-fly-out-only' unless sidebar_menu.has_renderable_items?) }
= nav_link(**sidebar_menu.all_active_routes, html_options: { class: 'fly-out-top-item' } ) do
- - if sidebar_refactor_disabled?
- = link_to sidebar_menu.link, class: "'has-sub-items' if sidebar_menu.has_renderable_items?", **sidebar_menu.collapsed_container_html_options do
- = render 'shared/nav/sidebar_menu_collapsed', sidebar_menu: sidebar_menu
- - else
- %span.fly-out-top-item-container
- = render 'shared/nav/sidebar_menu_collapsed', sidebar_menu: sidebar_menu
+ %span.fly-out-top-item-container
+ %strong.fly-out-top-item-name
+ = sidebar_menu.title
+ - if sidebar_menu.has_pill?
+ %span.badge.badge-pill.count.fly-out-badge{ **sidebar_menu.pill_html_options }
+ = number_with_delimiter(sidebar_menu.pill_count)
- if sidebar_menu.has_renderable_items?
%li.divider.fly-out-top-item
diff --git a/app/views/shared/nav/_sidebar_menu_collapsed.html.haml b/app/views/shared/nav/_sidebar_menu_collapsed.html.haml
deleted file mode 100644
index 78567a991df..00000000000
--- a/app/views/shared/nav/_sidebar_menu_collapsed.html.haml
+++ /dev/null
@@ -1,5 +0,0 @@
-%strong.fly-out-top-item-name
- = sidebar_menu.title
-- if sidebar_menu.has_pill?
- %span.badge.badge-pill.count.fly-out-badge{ **sidebar_menu.pill_html_options }
- = number_with_delimiter(sidebar_menu.pill_count)