From 98c31e998c8f3652628327ace45efaa5d3fa7087 Mon Sep 17 00:00:00 2001 From: Ezekiel Kigbo <ekigbo@gitlab.com> Date: Thu, 12 Dec 2019 00:34:14 +1100 Subject: [PATCH] Fix analytics icon alignment Unnests the ul list so that the icon list styles correctly apply. Added changelog entry --- .../layouts/nav/sidebar/_analytics.html.haml | 74 +++++++++---------- .../ek-fix-analytics-icon-alignment.yml | 5 ++ 2 files changed, 42 insertions(+), 37 deletions(-) create mode 100644 ee/changelogs/unreleased/ek-fix-analytics-icon-alignment.yml diff --git a/ee/app/views/layouts/nav/sidebar/_analytics.html.haml b/ee/app/views/layouts/nav/sidebar/_analytics.html.haml index fe29ef290e1..d062fe98dd2 100644 --- a/ee/app/views/layouts/nav/sidebar/_analytics.html.haml +++ b/ee/app/views/layouts/nav/sidebar/_analytics.html.haml @@ -5,42 +5,42 @@ .avatar-container.s40.settings-avatar = sprite_icon('log', size: 24) .sidebar-context-title= _('Analytics') - %ul.sidebar-top-level-items - - if Gitlab::Analytics.productivity_analytics_enabled? - = nav_link(controller: :productivity_analytics) do - = link_to analytics_productivity_analytics_path, class: 'qa-sidebar-productivity-analytics' do - .nav-icon-container - = sprite_icon('comment') - %span.nav-item-name - = _('Productivity Analytics') - %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :productivity_analytics, html_options: { class: "fly-out-top-item qa-sidebar-productivity-analytics-fly-out" } ) do - = link_to analytics_productivity_analytics_path do - %strong.fly-out-top-item-name - = _('Productivity Analytics') + %ul.sidebar-top-level-items + - if Gitlab::Analytics.productivity_analytics_enabled? + = nav_link(controller: :productivity_analytics) do + = link_to analytics_productivity_analytics_path, class: 'qa-sidebar-productivity-analytics' do + .nav-icon-container + = sprite_icon('comment') + %span.nav-item-name + = _('Productivity Analytics') + %ul.sidebar-sub-level-items.is-fly-out-only + = nav_link(controller: :productivity_analytics, html_options: { class: "fly-out-top-item qa-sidebar-productivity-analytics-fly-out" } ) do + = link_to analytics_productivity_analytics_path do + %strong.fly-out-top-item-name + = _('Productivity Analytics') - - if Gitlab::Analytics.cycle_analytics_enabled? - = nav_link(controller: :cycle_analytics) do - = link_to analytics_cycle_analytics_path, class: 'qa-sidebar-cycle-analytics' do - .nav-icon-container - = sprite_icon('repeat') - %span.nav-item-name - = _('Cycle Analytics') - %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :cycle_analytics, html_options: { class: "fly-out-top-item qa-sidebar-cycle-analytics-fly-out" } ) do - = link_to analytics_cycle_analytics_path do - %strong.fly-out-top-item-name - = _('Cycle Analytics') - - if Gitlab::Analytics.code_analytics_enabled? - = nav_link(controller: :code_analytics) do - = link_to analytics_code_analytics_path, class: 'qa-sidebar-code-analytics' do - .nav-icon-container - = sprite_icon('code') - %span.nav-item-name - = _('Code Analytics') - %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :code_analytics, html_options: { class: "fly-out-top-item qa-sidebar-code-analytics-fly-out" } ) do - = link_to analytics_code_analytics_path do - %strong.fly-out-top-item-name - = _('Code Analytics') + - if Gitlab::Analytics.cycle_analytics_enabled? + = nav_link(controller: :cycle_analytics) do + = link_to analytics_cycle_analytics_path, class: 'qa-sidebar-cycle-analytics' do + .nav-icon-container + = sprite_icon('repeat') + %span.nav-item-name + = _('Cycle Analytics') + %ul.sidebar-sub-level-items.is-fly-out-only + = nav_link(controller: :cycle_analytics, html_options: { class: "fly-out-top-item qa-sidebar-cycle-analytics-fly-out" } ) do + = link_to analytics_cycle_analytics_path do + %strong.fly-out-top-item-name + = _('Cycle Analytics') + - if Gitlab::Analytics.code_analytics_enabled? + = nav_link(controller: :code_analytics) do + = link_to analytics_code_analytics_path, class: 'qa-sidebar-code-analytics' do + .nav-icon-container + = sprite_icon('code') + %span.nav-item-name + = _('Code Analytics') + %ul.sidebar-sub-level-items.is-fly-out-only + = nav_link(controller: :code_analytics, html_options: { class: "fly-out-top-item qa-sidebar-code-analytics-fly-out" } ) do + = link_to analytics_code_analytics_path do + %strong.fly-out-top-item-name + = _('Code Analytics') = render 'shared/sidebar_toggle_button' diff --git a/ee/changelogs/unreleased/ek-fix-analytics-icon-alignment.yml b/ee/changelogs/unreleased/ek-fix-analytics-icon-alignment.yml new file mode 100644 index 00000000000..73720fdcb9d --- /dev/null +++ b/ee/changelogs/unreleased/ek-fix-analytics-icon-alignment.yml @@ -0,0 +1,5 @@ +--- +title: Fix analytics icon alignment +merge_request: 21555 +author: +type: fixed -- 2.30.9