Commit 9ba30fc5 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch '10083-dropdown-ce-ee-difference' into 'master'

Removes EE diffs for dropdown_value_collapsed.vue

Closes gitlab-ee#10083

See merge request gitlab-org/gitlab-ce!27367
parents 4d78cacc ee7d2298
...@@ -14,10 +14,12 @@ export default { ...@@ -14,10 +14,12 @@ export default {
}, },
computed: { computed: {
labelsList() { labelsList() {
const labelsString = this.labels const labelsString = this.labels.length
.slice(0, 5) ? this.labels
.map(label => label.title) .slice(0, 5)
.join(', '); .map(label => label.title)
.join(', ')
: s__('LabelSelect|Labels');
if (this.labels.length > 5) { if (this.labels.length > 5) {
return sprintf(s__('LabelSelect|%{labelsString}, and %{remainingLabelCount} more'), { return sprintf(s__('LabelSelect|%{labelsString}, and %{remainingLabelCount} more'), {
......
---
title: Moved EE/CE differences for dropdown_value_collapsed into CE
merge_request: 27367
author:
type: other
...@@ -5189,6 +5189,9 @@ msgstr "" ...@@ -5189,6 +5189,9 @@ msgstr ""
msgid "LabelSelect|%{labelsString}, and %{remainingLabelCount} more" msgid "LabelSelect|%{labelsString}, and %{remainingLabelCount} more"
msgstr "" msgstr ""
msgid "LabelSelect|Labels"
msgstr ""
msgid "Labels" msgid "Labels"
msgstr "" msgstr ""
......
...@@ -27,10 +27,10 @@ describe('DropdownValueCollapsedComponent', () => { ...@@ -27,10 +27,10 @@ describe('DropdownValueCollapsedComponent', () => {
describe('computed', () => { describe('computed', () => {
describe('labelsList', () => { describe('labelsList', () => {
it('returns empty text when `labels` prop is empty array', () => { it('returns default text when `labels` prop is empty array', () => {
const vmEmptyLabels = createComponent([]); const vmEmptyLabels = createComponent([]);
expect(vmEmptyLabels.labelsList).toBe(''); expect(vmEmptyLabels.labelsList).toBe('Labels');
vmEmptyLabels.$destroy(); vmEmptyLabels.$destroy();
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment