Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
300aa50a
Commit
300aa50a
authored
Jul 07, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
41cd27f2
b9b252be
Changes
34
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
90 additions
and
294 deletions
+90
-294
app/assets/stylesheets/startup/startup-dark.scss
app/assets/stylesheets/startup/startup-dark.scss
+2
-22
app/assets/stylesheets/startup/startup-general.scss
app/assets/stylesheets/startup/startup-general.scss
+2
-22
app/helpers/groups_helper.rb
app/helpers/groups_helper.rb
+3
-9
app/helpers/sidebars_helper.rb
app/helpers/sidebars_helper.rb
+0
-8
app/services/branches/create_service.rb
app/services/branches/create_service.rb
+6
-2
app/views/layouts/nav/sidebar/_admin.html.haml
app/views/layouts/nav/sidebar/_admin.html.haml
+2
-5
app/views/layouts/nav/sidebar/_context_menu_body.html.haml
app/views/layouts/nav/sidebar/_context_menu_body.html.haml
+0
-9
app/views/layouts/nav/sidebar/_group.html.haml
app/views/layouts/nav/sidebar/_group.html.haml
+15
-46
app/views/layouts/nav/sidebar/_profile.html.haml
app/views/layouts/nav/sidebar/_profile.html.haml
+2
-5
app/views/projects/settings/operations/show.html.haml
app/views/projects/settings/operations/show.html.haml
+2
-3
app/views/shared/_sidebar_toggle_button.html.haml
app/views/shared/_sidebar_toggle_button.html.haml
+0
-2
app/views/shared/nav/_scope_menu.html.haml
app/views/shared/nav/_scope_menu.html.haml
+6
-6
app/views/shared/nav/_scope_menu_body.html.haml
app/views/shared/nav/_scope_menu_body.html.haml
+0
-8
app/views/shared/nav/_sidebar.html.haml
app/views/shared/nav/_sidebar.html.haml
+2
-4
app/views/shared/nav/_sidebar_menu.html.haml
app/views/shared/nav/_sidebar_menu.html.haml
+6
-6
app/views/shared/nav/_sidebar_menu_collapsed.html.haml
app/views/shared/nav/_sidebar_menu_collapsed.html.haml
+0
-5
config/feature_flags/development/sidebar_refactor.yml
config/feature_flags/development/sidebar_refactor.yml
+0
-8
doc/ci/yaml/index.md
doc/ci/yaml/index.md
+1
-1
ee/app/assets/javascripts/vulnerabilities/components/generic_report/types/named_list.vue
...rabilities/components/generic_report/types/named_list.vue
+2
-2
ee/app/assets/stylesheets/startup/startup-dark.scss
ee/app/assets/stylesheets/startup/startup-dark.scss
+2
-22
ee/app/assets/stylesheets/startup/startup-general.scss
ee/app/assets/stylesheets/startup/startup-general.scss
+2
-22
ee/app/models/gitlab/seat_link_data.rb
ee/app/models/gitlab/seat_link_data.rb
+0
-1
ee/app/services/protected_environments/search_service.rb
ee/app/services/protected_environments/search_service.rb
+1
-1
ee/app/views/layouts/nav/sidebar/_security.html.haml
ee/app/views/layouts/nav/sidebar/_security.html.haml
+10
-29
ee/spec/controllers/admin/application_settings_controller_spec.rb
...controllers/admin/application_settings_controller_spec.rb
+0
-1
ee/spec/frontend/vulnerabilities/generic_report/types/named_list_spec.js
...d/vulnerabilities/generic_report/types/named_list_spec.js
+4
-4
ee/spec/models/gitlab/seat_link_data_spec.rb
ee/spec/models/gitlab/seat_link_data_spec.rb
+0
-2
ee/spec/workers/sync_seat_link_request_worker_spec.rb
ee/spec/workers/sync_seat_link_request_worker_spec.rb
+0
-28
locale/gitlab.pot
locale/gitlab.pot
+0
-6
qa/qa/page/project/sub_menus/project.rb
qa/qa/page/project/sub_menus/project.rb
+1
-1
spec/requests/api/branches_spec.rb
spec/requests/api/branches_spec.rb
+2
-1
spec/requests/api/graphql/mutations/branches/create_spec.rb
spec/requests/api/graphql/mutations/branches/create_spec.rb
+2
-1
spec/services/branches/create_service_spec.rb
spec/services/branches/create_service_spec.rb
+14
-1
spec/services/commits/commit_patch_service_spec.rb
spec/services/commits/commit_patch_service_spec.rb
+1
-1
No files found.
app/assets/stylesheets/startup/startup-dark.scss
View file @
300aa50a
...
...
@@ -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
;
}
...
...
app/assets/stylesheets/startup/startup-general.scss
View file @
300aa50a
...
...
@@ -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
;
...
...
app/helpers/groups_helper.rb
View file @
300aa50a
...
...
@@ -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
...
...
app/helpers/sidebars_helper.rb
View file @
300aa50a
...
...
@@ -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
...
...
app/services/branches/create_service.rb
View file @
300aa50a
...
...
@@ -9,12 +9,16 @@ module Branches
return
result
if
result
[
:status
]
==
:error
new_branch
=
repository
.
add_branch
(
current_user
,
branch_name
,
ref
)
begin
new_branch
=
repository
.
add_branch
(
current_user
,
branch_name
,
ref
)
rescue
Gitlab
::
Git
::
CommandError
=>
e
return
error
(
"Failed to create branch '
#{
branch_name
}
':
#{
e
}
"
)
end
if
new_branch
success
(
new_branch
)
else
error
(
"
Invalid reference name:
#{
ref
}
"
)
error
(
"
Failed to create branch '
#{
branch_name
}
': invalid reference name '
#{
ref
}
'
"
)
end
rescue
Gitlab
::
Git
::
PreReceiveError
=>
e
Gitlab
::
ErrorTracking
.
track_exception
(
e
,
pre_receive_message:
e
.
raw_message
,
branch_name:
branch_name
,
ref:
ref
)
...
...
app/views/layouts/nav/sidebar/_admin.html.haml
View file @
300aa50a
-
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'
}
}
...
...
app/views/layouts/nav/sidebar/_context_menu_body.html.haml
deleted
100644 → 0
View file @
41cd27f2
-
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
app/views/layouts/nav/sidebar/_group.html.haml
View file @
300aa50a
...
...
@@ -4,59 +4,48 @@
%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'
=
nav_link
(
path:
[
'groups#show'
,
'groups#details'
],
html_options:
{
class:
'context-header'
})
do
=
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
%span
=
_
(
'Members'
)
-
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
%span
=
_
(
'Members'
)
=
render_if_exists
"layouts/nav/ee/epic_link"
,
group:
@group
...
...
@@ -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
...
...
app/views/layouts/nav/sidebar/_profile.html.haml
View file @
300aa50a
-
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
...
...
app/views/projects/settings/operations/show.html.haml
View file @
300aa50a
-
@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'
...
...
app/views/shared/_sidebar_toggle_button.html.haml
View file @
300aa50a
%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
...
...
app/views/shared/nav/_scope_menu.html.haml
View file @
300aa50a
-
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
app/views/shared/nav/_scope_menu_body.html.haml
deleted
100644 → 0
View file @
41cd27f2
-
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
app/views/shared/nav/_sidebar.html.haml
View file @
300aa50a
%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
...
...
app/views/shared/nav/_sidebar_menu.html.haml
View file @
300aa50a
...
...
@@ -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
...
...
app/views/shared/nav/_sidebar_menu_collapsed.html.haml
deleted
100644 → 0
View file @
41cd27f2
%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
)
config/feature_flags/development/sidebar_refactor.yml
deleted
100644 → 0
View file @
41cd27f2
---
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
doc/ci/yaml/index.md
View file @
300aa50a
...
...
@@ -1716,7 +1716,7 @@ use [`needs:pipeline`](#artifact-downloads-to-child-pipelines).
You should not download artifacts from the same ref as a running pipeline. Concurrent
pipelines running on the same ref could override the artifacts.
####
#
Artifact downloads to child pipelines
#### Artifact downloads to child pipelines
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/255983) in GitLab v13.7.
...
...
ee/app/assets/javascripts/vulnerabilities/components/generic_report/types/named_list.vue
View file @
300aa50a
...
...
@@ -23,12 +23,12 @@ export default {
<div
class=
"gl-display-table"
>
<ul
v-if=
"hasItems"
class=
"generic-report-named-list"
>
<li
v-for=
"
{ label, ...values } in items"
v-for=
"
{ label,
name,
...values } in items"
:key="label"
class="generic-report-named-list-item"
data-testid="listItem"
>
<strong
class=
"generic-report-named-list-label"
>
{{
label
}}
</strong>
<strong
class=
"generic-report-named-list-label"
>
{{
name
}}
</strong>
<span
class=
"generic-report-named-list-value"
>
<report-item
:item=
"values"
:data-testid=
"`listValue$
{label}`" />
</span>
...
...
ee/app/assets/stylesheets/startup/startup-dark.scss
View file @
300aa50a
...
...
@@ -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
;
}
...
...
ee/app/assets/stylesheets/startup/startup-general.scss
View file @
300aa50a
...
...
@@ -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
;
...
...
ee/app/models/gitlab/seat_link_data.rb
View file @
300aa50a
...
...
@@ -40,7 +40,6 @@ module Gitlab
{
gitlab_version:
Gitlab
::
VERSION
,
timestamp:
timestamp
.
iso8601
,
date:
timestamp
.
to_date
.
to_s
,
license_key:
key
,
max_historical_user_count:
max_users
,
billable_users_count:
billable_users_count
,
...
...
ee/app/services/protected_environments/search_service.rb
View file @
300aa50a
# frozen_string_literal: true
module
ProtectedEnvironments
class
SearchService
<
BaseService
class
SearchService
<
::
ProtectedEnvironments
::
BaseService
# Returns unprotected environments filtered by name
# Limited to 20 per performance reasons
# rubocop: disable CodeReuse/ActiveRecord
...
...
ee/app/views/layouts/nav/sidebar/_security.html.haml
View file @
300aa50a
-
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,14 +15,9 @@
=
_
(
'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'
)
%span
.fly-out-top-item-container
%strong
.fly-out-top-item-name
=
_
(
'Security Dashboard'
)
=
nav_link
(
path:
%w[vulnerabilities#index]
)
do
=
link_to
security_vulnerabilities_path
,
class:
'shortcuts-project rspec-project-link'
do
...
...
@@ -36,14 +27,9 @@
=
_
(
'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'
)
%span
.fly-out-top-item-container
%strong
.fly-out-top-item-name
=
_
(
'Vulnerability Report'
)
=
nav_link
(
path:
%w[dashboard#settings]
)
do
=
link_to
settings_security_dashboard_path
,
class:
'shortcuts-project rspec-project-link'
do
...
...
@@ -53,13 +39,8 @@
=
_
(
'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'
)
%span
.fly-out-top-item-container
%strong
.fly-out-top-item-name
=
_
(
'Settings'
)
=
render
'shared/sidebar_toggle_button'
ee/spec/controllers/admin/application_settings_controller_spec.rb
View file @
300aa50a
...
...
@@ -396,7 +396,6 @@ RSpec.describe Admin::ApplicationSettingsController do
body
=
response
.
body
expect
(
body
).
to
start_with
(
'<span id="LC1" class="line" lang="json">'
)
expect
(
body
).
to
include
(
'<span class="nl">"license_key"</span>'
)
expect
(
body
).
to
include
(
"<span class=
\"
s2
\"
>
\"
#{
yesterday
.
to_date
}
\"
</span>"
)
expect
(
body
).
to
include
(
"<span class=
\"
s2
\"
>
\"
#{
yesterday
.
iso8601
}
\"
</span>"
)
expect
(
body
).
to
include
(
"<span class=
\"
mi
\"
>
#{
max_count
}
</span>"
)
expect
(
body
).
to
include
(
"<span class=
\"
mi
\"
>
#{
current_count
}
</span>"
)
...
...
ee/spec/frontend/vulnerabilities/generic_report/types/named_list_spec.js
View file @
300aa50a
...
...
@@ -5,8 +5,8 @@ import { extendedWrapper } from 'helpers/vue_test_utils_helper';
const
TEST_DATA
=
{
items
:
[
{
label
:
'
url1
'
,
type
:
REPORT_TYPES
.
url
,
href
:
'
http://foo.bar
'
},
{
label
:
'
url2
'
,
type
:
REPORT_TYPES
.
url
,
href
:
'
http://bar.baz
'
},
{
label
:
'
comment_1
'
,
name
:
'
url1
'
,
type
:
REPORT_TYPES
.
url
,
href
:
'
http://foo.bar
'
},
{
label
:
'
comment_2
'
,
name
:
'
url2
'
,
type
:
REPORT_TYPES
.
url
,
href
:
'
http://bar.baz
'
},
],
};
...
...
@@ -47,8 +47,8 @@ describe('ee/vulnerabilities/components/generic_report/types/named_list.vue', ()
});
describe
.
each
(
TEST_DATA
.
items
)(
'
list item: %s
'
,
(
item
)
=>
{
it
(
`renders the item's
label
`
,
()
=>
{
expect
(
wrapper
.
findByText
(
item
.
label
).
exists
()).
toBe
(
true
);
it
(
`renders the item's
name
`
,
()
=>
{
expect
(
wrapper
.
findByText
(
item
.
name
).
exists
()).
toBe
(
true
);
});
it
(
'
renders a report-item
'
,
()
=>
{
...
...
ee/spec/models/gitlab/seat_link_data_spec.rb
View file @
300aa50a
...
...
@@ -89,7 +89,6 @@ RSpec.describe Gitlab::SeatLinkData do
{
gitlab_version:
Gitlab
::
VERSION
,
timestamp:
timestamp
.
iso8601
,
date:
timestamp
.
to_date
.
iso8601
,
license_key:
key
,
max_historical_user_count:
max_users
,
billable_users_count:
billable_users_count
,
...
...
@@ -108,7 +107,6 @@ RSpec.describe Gitlab::SeatLinkData do
{
gitlab_version:
Gitlab
::
VERSION
,
timestamp:
timestamp
.
iso8601
,
date:
timestamp
.
to_date
.
iso8601
,
license_key:
key
,
max_historical_user_count:
max_users
,
billable_users_count:
billable_users_count
,
...
...
ee/spec/workers/sync_seat_link_request_worker_spec.rb
View file @
300aa50a
...
...
@@ -20,7 +20,6 @@ RSpec.describe SyncSeatLinkRequestWorker, type: :worker do
body:
{
gitlab_version:
Gitlab
::
VERSION
,
timestamp:
'2019-12-31T23:20:12Z'
,
date:
'2019-12-31'
,
license_key:
'123'
,
max_historical_user_count:
5
,
billable_users_count:
4
,
...
...
@@ -125,33 +124,6 @@ RSpec.describe SyncSeatLinkRequestWorker, type: :worker do
end
end
context
'with old date format string'
do
subject
(
:sync_seat_link
)
do
described_class
.
new
.
perform
(
'2020-01-01'
,
'123'
,
5
,
4
)
end
it
'makes an HTTP POST request with passed params'
do
stub_request
(
:post
,
seat_link_url
).
to_return
(
status:
200
)
sync_seat_link
expect
(
WebMock
).
to
have_requested
(
:post
,
seat_link_url
).
with
(
headers:
{
'Content-Type'
=>
'application/json'
},
body:
{
gitlab_version:
Gitlab
::
VERSION
,
timestamp:
'2020-01-01T00:00:00Z'
,
date:
'2020-01-01'
,
license_key:
'123'
,
max_historical_user_count:
5
,
billable_users_count:
4
,
hostname:
Gitlab
.
config
.
gitlab
.
host
,
instance_id:
Gitlab
::
CurrentSettings
.
uuid
,
license_md5:
::
License
.
current
.
md5
}.
to_json
)
end
end
context
'when response contains reconciliation dates'
do
let
(
:body
)
{
{
success:
true
,
next_reconciliation_date:
today
.
to_s
,
display_alert_from:
(
today
-
7
.
days
).
to_s
}.
to_json
}
let
(
:today
)
{
Date
.
current
}
...
...
locale/gitlab.pot
View file @
300aa50a
...
...
@@ -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 ""
...
...
qa/qa/page/project/sub_menus/project.rb
View file @
300aa50a
...
...
@@ -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
...
...
spec/requests/api/branches_spec.rb
View file @
300aa50a
...
...
@@ -727,10 +727,11 @@ RSpec.describe API::Branches do
end
it
'returns 400 if ref name is invalid'
do
error_message
=
'Failed to create branch \'new_design3\': invalid reference name \'foo\''
post
api
(
route
,
user
),
params:
{
branch:
'new_design3'
,
ref:
'foo'
}
expect
(
response
).
to
have_gitlab_http_status
(
:bad_request
)
expect
(
json_response
[
'message'
]).
to
eq
(
'Invalid reference name: foo'
)
expect
(
json_response
[
'message'
]).
to
eq
(
error_message
)
end
end
...
...
spec/requests/api/graphql/mutations/branches/create_spec.rb
View file @
300aa50a
...
...
@@ -35,11 +35,12 @@ RSpec.describe 'Creation of a new branch' do
end
context
'when ref is not correct'
do
err_msg
=
'Failed to create branch \'another_branch\': invalid reference name \'unknown\''
let
(
:new_branch
)
{
'another_branch'
}
let
(
:ref
)
{
'unknown'
}
it_behaves_like
'a mutation that returns errors in the response'
,
errors:
[
'Invalid reference name: unknown'
]
errors:
[
err_msg
]
end
end
end
spec/services/branches/create_service_spec.rb
View file @
300aa50a
...
...
@@ -38,10 +38,23 @@ RSpec.describe Branches::CreateService do
end
it
'returns an error with a reference name'
do
err_msg
=
'Failed to create branch \'new-feature\': invalid reference name \'unknown\''
result
=
service
.
execute
(
'new-feature'
,
'unknown'
)
expect
(
result
[
:status
]).
to
eq
(
:error
)
expect
(
result
[
:message
]).
to
eq
(
'Invalid reference name: unknown'
)
expect
(
result
[
:message
]).
to
eq
(
err_msg
)
end
end
context
'when an ambiguous branch name is provided'
do
it
'returns an error that branch could not be created'
do
err_msg
=
'Failed to create branch \'feature\': 13:reference is ambiguous.'
service
.
execute
(
'feature/widget'
,
'master'
)
result
=
service
.
execute
(
'feature'
,
'master'
)
expect
(
result
[
:status
]).
to
eq
(
:error
)
expect
(
result
[
:message
]).
to
eq
(
err_msg
)
end
end
...
...
spec/services/commits/commit_patch_service_spec.rb
View file @
300aa50a
...
...
@@ -87,7 +87,7 @@ RSpec.describe Commits::CommitPatchService do
context
'when specifying a non existent start branch'
do
let
(
:start_branch
)
{
'does-not-exist'
}
it_behaves_like
'an error response'
,
'
Invalid reference name
'
it_behaves_like
'an error response'
,
'
Failed to create branch
'
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment