Addressed feedback
This commit is contained in:
parent
696740844b
commit
87284321ff
5 changed files with 13 additions and 14 deletions
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue