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)
- 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
- 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)
- Fix badge count alignment (ClemMakesApps)
- 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
- Reduce size of HTML used by diff comment forms
- 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)
- 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.
- PipelinesFinder uses git cache data
- Track a user who created a pipeline
...
...
app/assets/javascripts/labels_select.js
View file @
87284321
...
...
@@ -32,6 +32,8 @@
labelNoneHTMLTemplate
=
'
<span class="no-value">None</span>
'
;
}
$sidebarLabelTooltip
.
tooltip
();
new
gl
.
CreateLabelDropdown
(
$dropdown
.
closest
(
'
.dropdown
'
).
find
(
'
.dropdown-new-label
'
),
projectId
);
saveLabelData
=
function
()
{
...
...
app/helpers/issuables_helper.rb
View file @
87284321
...
...
@@ -72,18 +72,14 @@ module IssuablesHelper
end
end
def
issuable_labels_tooltip
(
labels
)
max_labels
=
5
label_size
=
labels
.
size
label_names
=
labels
.
each_with_index
.
map
do
|
label
,
i
|
label
.
name
unless
i
>=
max_labels
end
def
issuable_labels_tooltip
(
labels
,
limit:
5
)
first
=
labels
[
0
...
limit
]
last
=
labels
[(
limit
-
1
)
...-
1
]
if
label_size
>
max_labels
label_names
<<
"and
#{
label_size
-
max_labels
}
more"
end
label_names
=
first
.
collect
(
&
:name
)
label_names
<<
"and
#{
last
.
size
}
more"
unless
last
.
empty?
label_names
.
compact
.
join
(
', '
)
label_names
.
join
(
', '
)
end
private
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
87284321
...
...
@@ -109,7 +109,7 @@
-
if
issuable
.
project
.
labels
.
any?
.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'
)
%span
=
issuable
.
labels_array
.
size
...
...
spec/features/issues/issue_sidebar_spec.rb
View file @
87284321
require
'rails_helper'
feature
'Issue Sidebar'
,
feature:
true
do
include
WaitForAjax
let
(
:project
)
{
create
(
:project
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let!
(
:user
)
{
create
(
:user
)}
...
...
@@ -103,7 +105,7 @@ feature 'Issue Sidebar', feature: true do
end
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'
)
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