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
7b64287b
Commit
7b64287b
authored
Oct 06, 2021
by
Simon Knox
Committed by
Dmitry Gruzd
Oct 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove whitespace in sidebar when iterations disabled
parent
4fc1e318
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
3 deletions
+55
-3
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+4
-3
ee/spec/views/shared/issuable/_sidebar.html.haml_spec.rb
ee/spec/views/shared/issuable/_sidebar.html.haml_spec.rb
+51
-0
No files found.
app/views/shared/issuable/_sidebar.html.haml
View file @
7b64287b
...
...
@@ -7,6 +7,7 @@
-
can_edit_issuable
=
issuable_sidebar
.
dig
(
:current_user
,
:can_edit
)
-
add_page_startup_api_call
"
#{
issuable_sidebar
[
:issuable_json_path
]
}
?serializer=sidebar_extras"
-
reviewers
=
local_assigns
.
fetch
(
:reviewers
,
nil
)
-
in_group_context_with_iterations
=
@project
.
group
.
present?
&&
issuable_sidebar
[
:supports_iterations
]
%aside
.right-sidebar.js-right-sidebar.js-issuable-sidebar
{
data:
{
signed:
{
in:
signed_in
},
issuable_type:
issuable_type
},
class:
sidebar_gutter_collapsed_class
,
'aria-live'
=>
'polite'
,
'aria-label'
:
issuable_type
}
.issuable-sidebar
...
...
@@ -28,11 +29,11 @@
=
render_if_exists
'shared/issuable/sidebar_item_epic'
,
issuable_sidebar:
issuable_sidebar
,
group_path:
@project
.
group
.
full_path
,
project_path:
issuable_sidebar
[
:project_full_path
],
issue_iid:
issuable_sidebar
[
:iid
],
issuable_type:
issuable_type
-
if
issuable_sidebar
[
:supports_milestone
]
.block.milestone
{
:class
=>
(
"gl-border-b-0!"
if
i
ssuable_sidebar
[
:supports_iterations
]
),
data:
{
qa_selector:
'milestone_block'
}
}
.block.milestone
{
:class
=>
(
"gl-border-b-0!"
if
i
n_group_context_with_iterations
),
data:
{
qa_selector:
'milestone_block'
}
}
.js-milestone-select
{
data:
{
can_edit:
can_edit_issuable
.
to_s
,
project_path:
issuable_sidebar
[
:project_full_path
],
issue_iid:
issuable_sidebar
[
:iid
]
}
}
-
if
@project
.
group
.
present?
&&
issuable_sidebar
[
:supports_iterations
]
.block
{
class:
'gl-pt-0!
'
,
data:
{
qa_selector:
'iteration_container'
}
}
-
if
in_group_context_with_iterations
.block
{
class:
'gl-pt-0!
gl-collapse-empty'
,
data:
{
qa_selector:
'iteration_container'
,
testid:
'iteration_container'
}
}
<
=
render_if_exists
'shared/issuable/iteration_select'
,
can_edit:
can_edit_issuable
.
to_s
,
group_path:
@project
.
group
.
full_path
,
project_path:
issuable_sidebar
[
:project_full_path
],
issue_iid:
issuable_sidebar
[
:iid
],
issuable_type:
issuable_type
-
if
issuable_sidebar
[
:supports_time_tracking
]
...
...
ee/spec/views/shared/issuable/_sidebar.html.haml_spec.rb
0 → 100644
View file @
7b64287b
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
'shared/issuable/_iterations_dropdown.html.haml'
do
let_it_be
(
:user
)
{
create
(
:user
)
}
subject
(
:rendered
)
do
render
'shared/issuable/sidebar'
,
issuable_sidebar:
IssueSerializer
.
new
(
current_user:
user
)
.
represent
(
issuable
,
serializer:
'sidebar'
),
assignees:
[]
end
context
'project in a group'
do
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:project
)
{
create
(
:project
,
group:
group
)
}
before
do
assign
(
:project
,
project
)
end
context
'issuable that supports iterations'
do
let
(
:issuable
)
{
create
(
:issue
,
project:
project
)
}
it
'shows iteration dropdown'
do
expect
(
rendered
).
to
have_css
(
'[data-testid="iteration_container"]'
)
end
end
context
'issuable does not support iterations'
do
let
(
:issuable
)
{
create
(
:incident
,
project:
project
)
}
it
'does not show iteration dropdown'
do
expect
(
rendered
).
not_to
have_css
(
'[data-testid="iteration_container"]'
)
end
end
end
context
'non-group project'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:issuable
)
{
create
(
:issue
,
project:
project
)
}
before
do
assign
(
:project
,
project
)
end
it
'does not show iteration dropdown'
do
expect
(
rendered
).
not_to
have_css
(
'[data-testid="iteration_container"]'
)
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