Commit 548d1fd1 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'ss/rm-enable-label-perma-links' into 'master'

Rm enableLabelPermalinks from components

See merge request gitlab-org/gitlab!80239
parents 3184daec b445dba8
......@@ -31,10 +31,6 @@ export default {
type: Object,
required: true,
},
enableLabelPermalinks: {
type: Boolean,
required: true,
},
labelFilterParam: {
type: String,
required: false,
......@@ -142,11 +138,8 @@ export default {
return label.title || label.name;
},
labelTarget(label) {
if (this.enableLabelPermalinks) {
const value = encodeURIComponent(this.labelTitle(label));
return `?${this.labelFilterParam}[]=${value}`;
}
return '#';
const value = encodeURIComponent(this.labelTitle(label));
return `?${this.labelFilterParam}[]=${value}`;
},
/**
* This is needed as an independent method since
......
......@@ -133,11 +133,6 @@ export default {
required: false,
default: 2,
},
enableLabelPermalinks: {
type: Boolean,
required: false,
default: true,
},
labelFilterParam: {
type: String,
required: false,
......@@ -321,7 +316,6 @@ export default {
:data-qa-issuable-title="issuable.title"
:issuable-symbol="issuableSymbol"
:issuable="issuable"
:enable-label-permalinks="enableLabelPermalinks"
:label-filter-param="labelFilterParam"
:show-checkbox="showBulkEditSidebar"
:checked="issuableChecked(issuable)"
......
......@@ -13,7 +13,6 @@ Object {
"currentPage": 1,
"currentTab": "opened",
"defaultPageSize": 2,
"enableLabelPermalinks": true,
"error": "",
"hasNextPage": false,
"hasPreviousPage": false,
......
......@@ -10,7 +10,6 @@ import { mockIssuable, mockRegularLabel, mockScopedLabel } from '../mock_data';
const createComponent = ({
issuableSymbol = '#',
issuable = mockIssuable,
enableLabelPermalinks = true,
showCheckbox = true,
slots = {},
} = {}) =>
......@@ -18,7 +17,6 @@ const createComponent = ({
propsData: {
issuableSymbol,
issuable,
enableLabelPermalinks,
showDiscussions: true,
showCheckbox,
},
......@@ -212,23 +210,13 @@ describe('IssuableItem', () => {
});
describe('labelTarget', () => {
it('returns target string for a provided label param when `enableLabelPermalinks` is true', () => {
it('returns target string for a provided label param', () => {
wrapper = createComponent();
expect(wrapper.vm.labelTarget(mockRegularLabel)).toBe(
'?label_name[]=Documentation%20Update',
);
});
it('returns string "#" for a provided label param when `enableLabelPermalinks` is false', async () => {
wrapper = createComponent({
enableLabelPermalinks: false,
});
await nextTick();
expect(wrapper.vm.labelTarget(mockRegularLabel)).toBe('#');
});
});
});
......
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