Commit e749de32 authored by Denys Mishunov's avatar Denys Mishunov

Merge branch '326111-fj-remove-ff-from-views' into 'master'

Remove ff `sidebar_refactor` from views and remove flag [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!64384
parents 095e2843 6c3da943
......@@ -458,8 +458,7 @@ a {
border-top: 1px solid #404040;
}
.toggle-sidebar-button .collapse-text,
.toggle-sidebar-button .icon-chevron-double-lg-left,
.toggle-sidebar-button .icon-chevron-double-lg-right {
.toggle-sidebar-button .icon-chevron-double-lg-left {
color: #999;
}
svg {
......@@ -1325,10 +1324,8 @@ input {
}
.toggle-sidebar-button .collapse-text,
.toggle-sidebar-button .icon-chevron-double-lg-left,
.toggle-sidebar-button .icon-chevron-double-lg-right,
.close-nav-button .collapse-text,
.close-nav-button .icon-chevron-double-lg-left,
.close-nav-button .icon-chevron-double-lg-right {
.close-nav-button .icon-chevron-double-lg-left {
color: inherit;
}
.collapse-text {
......@@ -1514,12 +1511,6 @@ svg.s16 {
height: 32px;
margin-right: 8px;
}
.avatar.s40,
.avatar-container.s40 {
width: 40px;
height: 40px;
margin-right: 8px;
}
.avatar {
transition-property: none;
width: 40px;
......@@ -1547,10 +1538,6 @@ svg.s16 {
font-size: 14px;
line-height: 32px;
}
.identicon.s40 {
font-size: 16px;
line-height: 38px;
}
.identicon.bg1 {
background-color: #660e00;
}
......@@ -1590,10 +1577,6 @@ svg.s16 {
margin: 0;
align-self: center;
}
.avatar-container.s40 {
min-width: 40px;
min-height: 40px;
}
.rect-avatar {
border-radius: 2px;
}
......@@ -1616,9 +1599,6 @@ svg.s16 {
.avatar.s32 {
border-radius: 4px;
}
.rect-avatar.s40 {
border-radius: 4px;
}
body.gl-dark .navbar-gitlab {
background-color: #fafafa;
}
......
......@@ -439,8 +439,7 @@ a {
border-top: 1px solid #dbdbdb;
}
.toggle-sidebar-button .collapse-text,
.toggle-sidebar-button .icon-chevron-double-lg-left,
.toggle-sidebar-button .icon-chevron-double-lg-right {
.toggle-sidebar-button .icon-chevron-double-lg-left {
color: #666;
}
svg {
......@@ -1306,10 +1305,8 @@ input {
}
.toggle-sidebar-button .collapse-text,
.toggle-sidebar-button .icon-chevron-double-lg-left,
.toggle-sidebar-button .icon-chevron-double-lg-right,
.close-nav-button .collapse-text,
.close-nav-button .icon-chevron-double-lg-left,
.close-nav-button .icon-chevron-double-lg-right {
.close-nav-button .icon-chevron-double-lg-left {
color: inherit;
}
.collapse-text {
......@@ -1495,12 +1492,6 @@ svg.s16 {
height: 32px;
margin-right: 8px;
}
.avatar.s40,
.avatar-container.s40 {
width: 40px;
height: 40px;
margin-right: 8px;
}
.avatar {
transition-property: none;
width: 40px;
......@@ -1528,10 +1519,6 @@ svg.s16 {
font-size: 14px;
line-height: 32px;
}
.identicon.s40 {
font-size: 16px;
line-height: 38px;
}
.identicon.bg1 {
background-color: #fcf1ef;
}
......@@ -1571,10 +1558,6 @@ svg.s16 {
margin: 0;
align-self: center;
}
.avatar-container.s40 {
min-width: 40px;
min-height: 40px;
}
.rect-avatar {
border-radius: 2px;
}
......@@ -1597,9 +1580,6 @@ svg.s16 {
.avatar.s32 {
border-radius: 4px;
}
.rect-avatar.s40 {
border-radius: 4px;
}
.tab-width-8 {
-moz-tab-size: 8;
......
......@@ -5,15 +5,9 @@ module GroupsHelper
%w[
groups#activity
groups#subgroups
].tap do |paths|
extra_routes = if sidebar_refactor_disabled?
['groups#show', 'groups#details']
else
['labels#index', 'group_members#index']
end
paths.concat(extra_routes)
end
labels#index
group_members#index
]
end
def group_settings_nav_link_paths
......
......@@ -20,14 +20,6 @@ module SidebarsHelper
Sidebars::Projects::Context.new(**context_data)
end
def sidebar_refactor_enabled?
Feature.enabled?(:sidebar_refactor, current_user, default_enabled: :yaml)
end
def sidebar_refactor_disabled?
!sidebar_refactor_enabled?
end
private
def sidebar_project_tracking_attrs
......
- avatar_size = sidebar_refactor_disabled? ? 24 : 18
- avatar_size_class = sidebar_refactor_disabled? ? 's40' : 's32'
%aside.nav-sidebar.qa-admin-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?), 'aria-label': _('Admin navigation') }
.nav-sidebar-inner-scroll
.context-header
= link_to admin_root_path, title: _('Admin Overview') do
%span{ class: ['avatar-container', 'settings-avatar', 'rect-avatar', avatar_size_class] }
= sprite_icon('admin', size: avatar_size)
%span{ class: ['avatar-container', 'settings-avatar', 'rect-avatar', 's32'] }
= sprite_icon('admin', size: 18)
%span.sidebar-context-title
= _('Admin Area')
%ul.sidebar-top-level-items{ data: { qa_selector: 'admin_sidebar_overview_submenu_content' } }
......
- avatar_size_class = sidebar_refactor_disabled? ? 's40' : 's32'
- avatar_classes = ['avatar-container', 'rect-avatar', 'group-avatar']
- avatar_classes << avatar_size_class
= link_to group_path(@group), title: @group.name, data: { qa_selector: 'group_scope_link' } do
%span{ class: avatar_classes }
= group_icon(@group, class: ['avatar', 'avatar-tile', avatar_size_class])
%span.sidebar-context-title
= @group.name
......@@ -4,54 +4,43 @@
%aside.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?), **sidebar_tracking_attributes_by_object(@group), 'aria-label': aside_title }
.nav-sidebar-inner-scroll
- if sidebar_refactor_disabled?
.context-header
= render 'layouts/nav/sidebar/context_menu_body'
%ul.sidebar-top-level-items.qa-group-sidebar
- if sidebar_refactor_enabled?
= nav_link(path: ['groups#show', 'groups#details'], html_options: { class: 'context-header' }) do
= render 'layouts/nav/sidebar/context_menu_body'
= link_to group_path(@group), title: @group.name, data: { qa_selector: 'group_scope_link' } do
%span{ class: ['avatar-container', 'rect-avatar', 'group-avatar' , 's32'] }
= group_icon(@group, class: ['avatar', 'avatar-tile', 's32'])
%span.sidebar-context-title
= @group.name
= render_if_exists 'layouts/nav/sidebar/group_trial_status_widget', group: @group
- if group_sidebar_link?(:overview)
- paths = group_overview_nav_link_paths
= nav_link(path: paths, unless: -> { current_path?('groups/contribution_analytics#show') }, html_options: { class: 'home' }) do
- information_link = sidebar_refactor_enabled? ? activity_group_path(@group) : group_path(@group)
= link_to information_link, class: 'has-sub-items', data: { qa_selector: 'group_information_link' } do
= link_to activity_group_path(@group), class: 'has-sub-items', data: { qa_selector: 'group_information_link' } do
.nav-icon-container
- sprite = sidebar_refactor_enabled? ? 'group' : 'home'
= sprite_icon(sprite)
= sprite_icon('group')
%span.nav-item-name
= group_information_title(@group)
%ul.sidebar-sub-level-items{ data: { qa_selector: 'group_information_submenu'} }
= nav_link(path: paths, html_options: { class: "fly-out-top-item" } ) do
= link_to information_link do
= link_to activity_group_path(@group) do
%strong.fly-out-top-item-name
= group_information_title(@group)
%li.divider.fly-out-top-item
- if sidebar_refactor_disabled?
= nav_link(path: ['groups#show', 'groups#details', 'groups#subgroups'], html_options: { class: 'home' }) do
= link_to details_group_path(@group), title: _('Group details') do
%span
= _('Details')
- if group_sidebar_link?(:activity)
= nav_link(path: 'groups#activity') do
= link_to activity_group_path(@group), title: _('Activity') do
%span
= _('Activity')
- if group_sidebar_link?(:labels) && sidebar_refactor_enabled?
- if group_sidebar_link?(:labels)
= nav_link(path: 'labels#index') do
= link_to group_labels_path(@group), title: _('Labels') do
%span
= _('Labels')
- if sidebar_refactor_enabled?
- if group_sidebar_link?(:group_members)
= nav_link(path: 'group_members#index') do
= link_to group_group_members_path(@group), title: _('Members'), data: { qa_selector: 'group_members_item' } do
......@@ -88,12 +77,6 @@
%span
= boards_link_text
- if group_sidebar_link?(:labels) && sidebar_refactor_disabled?
= nav_link(path: 'labels#index') do
= link_to group_labels_path(@group), title: _('Labels') do
%span
= _('Labels')
- if group_sidebar_link?(:milestones)
= nav_link(path: 'milestones#index') do
= link_to group_milestones_path(@group), title: _('Milestones'), data: { qa_selector: 'group_milestones_link' } do
......@@ -141,20 +124,6 @@
- if group_sidebar_link?(:wiki)
= render 'layouts/nav/sidebar/wiki_link', wiki_url: @group.wiki.web_url
- if sidebar_refactor_disabled?
- if group_sidebar_link?(:group_members)
= nav_link(path: 'group_members#index') do
= link_to group_group_members_path(@group) do
.nav-icon-container
= sprite_icon('users')
%span.nav-item-name.qa-group-members-item
= _('Members')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(path: 'group_members#index', html_options: { class: "fly-out-top-item" } ) do
= link_to group_group_members_path(@group) do
%strong.fly-out-top-item-name
= _('Members')
- if group_sidebar_link?(:settings)
= nav_link(path: group_settings_nav_link_paths) do
= link_to edit_group_path(@group), class: 'has-sub-items' do
......
- avatar_size = sidebar_refactor_disabled? ? 40 : 32
- avatar_size_class = sidebar_refactor_disabled? ? 's40' : 's32'
%aside.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?), **sidebar_tracking_attributes_by_object(current_user), 'aria-label': _('User settings') }
.nav-sidebar-inner-scroll
.context-header
= link_to profile_path, title: _('Profile Settings') do
%span{ class: ['avatar-container', 'settings-avatar', avatar_size_class] }
= image_tag avatar_icon_for_user(current_user, avatar_size), class: ['avatar', 'avatar-tile', 'js-sidebar-user-avatar', avatar_size_class], alt: current_user.name, data: { testid: 'sidebar-user-avatar' }
%span{ class: ['avatar-container', 'settings-avatar', 's32'] }
= image_tag avatar_icon_for_user(current_user, 32), class: ['avatar', 'avatar-tile', 'js-sidebar-user-avatar', 's32'], alt: current_user.name, data: { testid: 'sidebar-user-avatar' }
%span.sidebar-context-title= _('User Settings')
%ul.sidebar-top-level-items
= nav_link(path: 'profiles#show', html_options: {class: 'home'}) do
......
- @content_class = 'limit-container-width' unless fluid_layout
- title = Feature.enabled?(:sidebar_refactor, current_user, default_enabled: :yaml) ? _('Monitor Settings') : _('Operations Settings')
- page_title title
- breadcrumb_title title
- page_title _('Monitor Settings')
- breadcrumb_title _('Monitor Settings')
= render 'projects/settings/operations/metrics_dashboard'
= render 'projects/settings/operations/tracing'
......
%a.toggle-sidebar-button.js-toggle-sidebar.qa-toggle-sidebar.rspec-toggle-sidebar{ role: "button", type: "button", title: "Toggle sidebar" }
= sprite_icon('chevron-double-lg-left', css_class: 'icon-chevron-double-lg-left')
- if sidebar_refactor_disabled?
= sprite_icon('chevron-double-lg-right', css_class: 'icon-chevron-double-lg-right')
%span.collapse-text.gl-ml-3= _("Collapse sidebar")
= button_tag class: 'close-nav-button', type: 'button' do
......
- 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: 'project_scope_link' } do
%span{ class: ['avatar-container', 'rect-avatar', 'project-avatar', 's32'] }
= 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
- 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
%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
- if 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?
- if 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
......
......@@ -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
%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
......
%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)
---
name: sidebar_refactor
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58638
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/326111
milestone: '13.11'
type: development
group: group::editor
default_enabled: true
......@@ -458,8 +458,7 @@ a {
border-top: 1px solid #404040;
}
.toggle-sidebar-button .collapse-text,
.toggle-sidebar-button .icon-chevron-double-lg-left,
.toggle-sidebar-button .icon-chevron-double-lg-right {
.toggle-sidebar-button .icon-chevron-double-lg-left {
color: #999;
}
svg {
......@@ -1325,10 +1324,8 @@ input {
}
.toggle-sidebar-button .collapse-text,
.toggle-sidebar-button .icon-chevron-double-lg-left,
.toggle-sidebar-button .icon-chevron-double-lg-right,
.close-nav-button .collapse-text,
.close-nav-button .icon-chevron-double-lg-left,
.close-nav-button .icon-chevron-double-lg-right {
.close-nav-button .icon-chevron-double-lg-left {
color: inherit;
}
.collapse-text {
......@@ -1514,12 +1511,6 @@ svg.s16 {
height: 32px;
margin-right: 8px;
}
.avatar.s40,
.avatar-container.s40 {
width: 40px;
height: 40px;
margin-right: 8px;
}
.avatar {
transition-property: none;
width: 40px;
......@@ -1547,10 +1538,6 @@ svg.s16 {
font-size: 14px;
line-height: 32px;
}
.identicon.s40 {
font-size: 16px;
line-height: 38px;
}
.identicon.bg1 {
background-color: #660e00;
}
......@@ -1590,10 +1577,6 @@ svg.s16 {
margin: 0;
align-self: center;
}
.avatar-container.s40 {
min-width: 40px;
min-height: 40px;
}
.rect-avatar {
border-radius: 2px;
}
......@@ -1616,9 +1599,6 @@ svg.s16 {
.avatar.s32 {
border-radius: 4px;
}
.rect-avatar.s40 {
border-radius: 4px;
}
body.gl-dark .navbar-gitlab {
background-color: #fafafa;
}
......
......@@ -439,8 +439,7 @@ a {
border-top: 1px solid #dbdbdb;
}
.toggle-sidebar-button .collapse-text,
.toggle-sidebar-button .icon-chevron-double-lg-left,
.toggle-sidebar-button .icon-chevron-double-lg-right {
.toggle-sidebar-button .icon-chevron-double-lg-left {
color: #666;
}
svg {
......@@ -1306,10 +1305,8 @@ input {
}
.toggle-sidebar-button .collapse-text,
.toggle-sidebar-button .icon-chevron-double-lg-left,
.toggle-sidebar-button .icon-chevron-double-lg-right,
.close-nav-button .collapse-text,
.close-nav-button .icon-chevron-double-lg-left,
.close-nav-button .icon-chevron-double-lg-right {
.close-nav-button .icon-chevron-double-lg-left {
color: inherit;
}
.collapse-text {
......@@ -1495,12 +1492,6 @@ svg.s16 {
height: 32px;
margin-right: 8px;
}
.avatar.s40,
.avatar-container.s40 {
width: 40px;
height: 40px;
margin-right: 8px;
}
.avatar {
transition-property: none;
width: 40px;
......@@ -1528,10 +1519,6 @@ svg.s16 {
font-size: 14px;
line-height: 32px;
}
.identicon.s40 {
font-size: 16px;
line-height: 38px;
}
.identicon.bg1 {
background-color: #fcf1ef;
}
......@@ -1571,10 +1558,6 @@ svg.s16 {
margin: 0;
align-self: center;
}
.avatar-container.s40 {
min-width: 40px;
min-height: 40px;
}
.rect-avatar {
border-radius: 2px;
}
......@@ -1597,9 +1580,6 @@ svg.s16 {
.avatar.s32 {
border-radius: 4px;
}
.rect-avatar.s40 {
border-radius: 4px;
}
.tab-width-8 {
-moz-tab-size: 8;
......
- avatar_size_class = sidebar_refactor_disabled? ? 's40' : 's32'
- avatar_classes = ['avatar-container', 'rect-avatar', 'settings-avatar']
- avatar_classes << avatar_size_class
%aside.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?), 'aria-label': _('Security navigation') }
.nav-sidebar-inner-scroll
.context-header
= link_to security_dashboard_path, title: _('Security Dashboard'), id: 'logo' do
%span{ class: avatar_classes }
%span{ class: ['avatar-container', 'rect-avatar', 'settings-avatar', 's32'] }
= brand_header_logo
%span.sidebar-context-title
= _('Security')
......@@ -19,11 +15,6 @@
= _('Security Dashboard')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(path: %w[dashboard#show], html_options: { class: "fly-out-top-item" } ) do
- if sidebar_refactor_disabled?
= link_to security_dashboard_path do
%strong.fly-out-top-item-name
= _('Security Dashboard')
- else
%span.fly-out-top-item-container
%strong.fly-out-top-item-name
= _('Security Dashboard')
......@@ -36,11 +27,6 @@
= _('Vulnerability Report')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(path: %w[vulnerabilities#index], html_options: { class: "fly-out-top-item" } ) do
- if sidebar_refactor_disabled?
= link_to security_vulnerabilities_path do
%strong.fly-out-top-item-name
= _('Vulnerability Report')
- else
%span.fly-out-top-item-container
%strong.fly-out-top-item-name
= _('Vulnerability Report')
......@@ -53,11 +39,6 @@
= _('Settings')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(path: %w[dashboard#settings], html_options: { class: "fly-out-top-item" } ) do
- if sidebar_refactor_disabled?
= link_to settings_security_dashboard_path do
%strong.fly-out-top-item-name
= _('Settings')
- else
%span.fly-out-top-item-container
%strong.fly-out-top-item-name
= _('Settings')
......
......@@ -15396,9 +15396,6 @@ msgstr ""
msgid "Group description (optional)"
msgstr ""
msgid "Group details"
msgstr ""
msgid "Group export could not be started."
msgstr ""
......@@ -23071,9 +23068,6 @@ msgstr ""
msgid "Operations Dashboard"
msgstr ""
msgid "Operations Settings"
msgstr ""
msgid "OperationsDashboard|Add a project to the dashboard"
msgstr ""
......
......@@ -13,7 +13,7 @@ module QA
base.class_eval do
include QA::Page::Project::SubMenus::Common
view 'app/views/shared/nav/_scope_menu_body.html.haml' do
view 'app/views/shared/nav/_scope_menu.html.haml' do
element :project_scope_link
end
end
......
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