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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
87284321
Commit
87284321
authored
Aug 18, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addressed feedback
parent
69674084
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
14 deletions
+13
-14
CHANGELOG
CHANGELOG
+1
-2
app/assets/javascripts/labels_select.js
app/assets/javascripts/labels_select.js
+2
-0
app/helpers/issuables_helper.rb
app/helpers/issuables_helper.rb
+6
-10
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+1
-1
spec/features/issues/issue_sidebar_spec.rb
spec/features/issues/issue_sidebar_spec.rb
+3
-1
No files found.
CHANGELOG
View file @
87284321
...
@@ -18,6 +18,7 @@ v 8.11.0 (unreleased)
...
@@ -18,6 +18,7 @@ v 8.11.0 (unreleased)
- API: Endpoints for enabling and disabling deploy keys
- API: Endpoints for enabling and disabling deploy keys
- API: List access requests, request access, approve, and deny access requests to a project or a group. !4833
- API: List access requests, request access, approve, and deny access requests to a project or a group. !4833
- Use long options for curl examples in documentation !5703 (winniehell)
- Use long options for curl examples in documentation !5703 (winniehell)
- Added tooltip listing label names to the labels value in the collapsed issuable sidebar
- Remove magic comments (`# encoding: UTF-8`) from Ruby files. !5456 (winniehell)
- Remove magic comments (`# encoding: UTF-8`) from Ruby files. !5456 (winniehell)
- Fix badge count alignment (ClemMakesApps)
- Fix badge count alignment (ClemMakesApps)
- GitLab Performance Monitoring can now track custom events such as the number of tags pushed to a repository
- GitLab Performance Monitoring can now track custom events such as the number of tags pushed to a repository
...
@@ -300,8 +301,6 @@ v 8.10.0
...
@@ -300,8 +301,6 @@ v 8.10.0
- Reduce size of HTML used by diff comment forms
- Reduce size of HTML used by diff comment forms
- Protected branches have a "Developers can Merge" setting. !4892 (original implementation by Mathias Vestergaard)
- Protected branches have a "Developers can Merge" setting. !4892 (original implementation by Mathias Vestergaard)
- Fix user creation with stronger minimum password requirements. !4054 (nathan-pmt)
- Fix user creation with stronger minimum password requirements. !4054 (nathan-pmt)
- Added tooltip listing label names to the labels value in the collapsed issuable sidebar
- Fix user creation with stronger minimum password requirements !4054 (nathan-pmt)
- Only show New Snippet button to users that can create snippets.
- Only show New Snippet button to users that can create snippets.
- PipelinesFinder uses git cache data
- PipelinesFinder uses git cache data
- Track a user who created a pipeline
- Track a user who created a pipeline
...
...
app/assets/javascripts/labels_select.js
View file @
87284321
...
@@ -32,6 +32,8 @@
...
@@ -32,6 +32,8 @@
labelNoneHTMLTemplate
=
'
<span class="no-value">None</span>
'
;
labelNoneHTMLTemplate
=
'
<span class="no-value">None</span>
'
;
}
}
$sidebarLabelTooltip
.
tooltip
();
new
gl
.
CreateLabelDropdown
(
$dropdown
.
closest
(
'
.dropdown
'
).
find
(
'
.dropdown-new-label
'
),
projectId
);
new
gl
.
CreateLabelDropdown
(
$dropdown
.
closest
(
'
.dropdown
'
).
find
(
'
.dropdown-new-label
'
),
projectId
);
saveLabelData
=
function
()
{
saveLabelData
=
function
()
{
...
...
app/helpers/issuables_helper.rb
View file @
87284321
...
@@ -72,18 +72,14 @@ module IssuablesHelper
...
@@ -72,18 +72,14 @@ module IssuablesHelper
end
end
end
end
def
issuable_labels_tooltip
(
labels
)
def
issuable_labels_tooltip
(
labels
,
limit:
5
)
max_labels
=
5
first
=
labels
[
0
...
limit
]
label_size
=
labels
.
size
last
=
labels
[(
limit
-
1
)
...-
1
]
label_names
=
labels
.
each_with_index
.
map
do
|
label
,
i
|
label
.
name
unless
i
>=
max_labels
end
if
label_size
>
max_labels
label_names
=
first
.
collect
(
&
:name
)
label_names
<<
"and
#{
label_size
-
max_labels
}
more"
label_names
<<
"and
#{
last
.
size
}
more"
unless
last
.
empty?
end
label_names
.
compact
.
join
(
', '
)
label_names
.
join
(
', '
)
end
end
private
private
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
87284321
...
@@ -109,7 +109,7 @@
...
@@ -109,7 +109,7 @@
-
if
issuable
.
project
.
labels
.
any?
-
if
issuable
.
project
.
labels
.
any?
.block.labels
.block.labels
.sidebar-collapsed-icon.js-sidebar-labels-tooltip
{
title:
issuable_labels_tooltip
(
issuable
.
labels
_array
),
data:
{
placement:
"left"
,
container:
"body"
}
}
.sidebar-collapsed-icon.js-sidebar-labels-tooltip
{
title:
issuable_labels_tooltip
(
issuable
.
labels
),
data:
{
placement:
"left"
,
container:
"body"
}
}
=
icon
(
'tags'
)
=
icon
(
'tags'
)
%span
%span
=
issuable
.
labels_array
.
size
=
issuable
.
labels_array
.
size
...
...
spec/features/issues/issue_sidebar_spec.rb
View file @
87284321
require
'rails_helper'
require
'rails_helper'
feature
'Issue Sidebar'
,
feature:
true
do
feature
'Issue Sidebar'
,
feature:
true
do
include
WaitForAjax
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let!
(
:user
)
{
create
(
:user
)}
let!
(
:user
)
{
create
(
:user
)}
...
@@ -103,7 +105,7 @@ feature 'Issue Sidebar', feature: true do
...
@@ -103,7 +105,7 @@ feature 'Issue Sidebar', feature: true do
end
end
find
(
'.edit-link'
).
click
find
(
'.edit-link'
).
click
sleep
1
wait_for_ajax
expect
(
find
(
'.js-sidebar-labels-tooltip'
,
visible:
false
)[
'data-original-title'
]).
to
eq
(
'a, b, c, d, e, and 1 more'
)
expect
(
find
(
'.js-sidebar-labels-tooltip'
,
visible:
false
)[
'data-original-title'
]).
to
eq
(
'a, b, c, d, e, and 1 more'
)
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