Commit ee7d2298 authored by Denys Mishunov's avatar Denys Mishunov

Removes EE diffs for dropdown_value_collapsed

parent d83eb63b
...@@ -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
? this.labels
.slice(0, 5) .slice(0, 5)
.map(label => label.title) .map(label => label.title)
.join(', '); .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
...@@ -5069,6 +5069,9 @@ msgstr "" ...@@ -5069,6 +5069,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