diff options
author | Ammar Alakkad <aalakkad@gitlab.com> | 2019-07-17 17:18:12 +0300 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-07-17 17:18:12 +0300 |
commit | 8ba48310af448d5e03601dc153cff1d66609280b (patch) | |
tree | 5b67c23a81935707971f42b890b4b7c492cb48b7 | |
parent | c11eb0c3a42dba550764e96426dd9bf21347b917 (diff) |
Resolve "Label picker: Line break on long label titles"
4 files changed, 12 insertions, 2 deletions
diff --git a/app/assets/javascripts/labels_select.js b/app/assets/javascripts/labels_select.js index bea43430edc..f50a6e3b19d 100644 --- a/app/assets/javascripts/labels_select.js +++ b/app/assets/javascripts/labels_select.js @@ -311,7 +311,8 @@ export default class LabelsSelect { // We need to identify which items are actually labels if (label.id) { - selectedClass.push('label-item'); + const selectedLayoutClasses = ['d-flex', 'flex-row', 'text-break-word']; + selectedClass.push('label-item', ...selectedLayoutClasses); linkEl.dataset.labelId = label.id; } diff --git a/app/assets/stylesheets/pages/labels.scss b/app/assets/stylesheets/pages/labels.scss index 11e8a32389f..7d5e185834b 100644 --- a/app/assets/stylesheets/pages/labels.scss +++ b/app/assets/stylesheets/pages/labels.scss @@ -30,6 +30,10 @@ .dropdown-content { max-height: 135px; } + + .dropdown-label-box { + flex: 0 0 auto; + } } .dropdown-new-label { diff --git a/changelogs/unreleased/48771-label-picker-line-break-on-long-label-titles.yml b/changelogs/unreleased/48771-label-picker-line-break-on-long-label-titles.yml new file mode 100644 index 00000000000..e598247b5d8 --- /dev/null +++ b/changelogs/unreleased/48771-label-picker-line-break-on-long-label-titles.yml @@ -0,0 +1,5 @@ +--- +title: 'Resolve Label picker: Line break on long label titles' +merge_request: 30610 +author: +type: fixed diff --git a/spec/features/issues/bulk_assignment_labels_spec.rb b/spec/features/issues/bulk_assignment_labels_spec.rb index 06cb2e36334..7be5961af09 100644 --- a/spec/features/issues/bulk_assignment_labels_spec.rb +++ b/spec/features/issues/bulk_assignment_labels_spec.rb @@ -381,7 +381,7 @@ describe 'Issues > Labels bulk assignment' do if unmark items.map do |item| # Make sure we are unmarking the item no matter the state it has currently - click_link item until find('a', text: item)[:class] == 'label-item' + click_link item until find('a', text: item)[:class].include? 'label-item' end end end |