Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

Commit 2800c70

Browse files
committed
Merge branch 'master' into replace-fa-icons
# Conflicts: # js/content.js
2 parents c31b91b + f6c7282 commit 2800c70

File tree

4 files changed

+5
-53
lines changed

4 files changed

+5
-53
lines changed

html/options.html

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,6 @@
6262
<div class="pbs pll">
6363
<small class="txt-muted">This feature is automatically disabled if logged-out</small>
6464
</div>
65-
<!--<div class="pts row">
66-
<div class="w40p txt-center browser-style">
67-
<input type="checkbox" id="enable_menu_to_hide_mrs_based_on_pipeline_status">
68-
</div>
69-
<div>
70-
<label for="enable_menu_to_hide_mrs_based_on_pipeline_status">Enable menu allowing to hide Merge Requests based on their latest pipeline status</label>
71-
</div>
72-
</div>
73-
<div class="pbs pll">
74-
<small class="txt-muted">This feature is automatically disabled if the GitLab "pipeline" feature is disabled</small>
75-
</div>-->
7665
<div class="txt-center pts pbs"><button type="submit" class="browser-style">Save preferences</button></div>
7766
</form>
7867

js/content.js

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
* Determines if the project do uses the Gitlab "pipeline" feature.
204204
*/
205205
isPipelineFeatureEnabled() {
206-
return false;// document.querySelector('.nav-sidebar .shortcuts-pipelines') ? true : false;
206+
return document.querySelector('.nav-sidebar .shortcuts-pipelines') ? true : false;
207207
}
208208

209209
/**
@@ -245,10 +245,6 @@
245245
if (self.userAuthenticated && self.preferences.enable_button_to_toggle_wip_status) {
246246
self.attachClickEventToToggleWipStatusButtons();
247247
}
248-
249-
if (self.pipelineFeatureEnabled && self.preferences.enable_menu_to_hide_mrs_based_on_pipeline_status) {
250-
self.addHideMrsByPipelineStatusMenu();
251-
}
252248
});
253249
}
254250

@@ -602,28 +598,7 @@
602598
'<use xlink:href="' this.getBaseIconsUrl + '/assets/icons-795a2ef2fd636a0538bbef3b8d2787dd90927b42d7617fdda8620930016b333d.svg#' + iconName + '"></use>' +
603599
'</svg>';
604600
}
605-
606-
addHideMrsByPipelineStatusMenu() {
607-
let menu = '<div class="filter-dropdown-container d-flex flex-column flex-md-row">' +
608-
'<div class="dropdown inline prepend-left-10">' +
609-
'<button class="btn btn-default dropdown-menu-toggle" data-display="static" data-toggle="dropdown" type="button">' +
610-
'Pipeline status <i aria-hidden="true" class="fa fa-chevron-down"></i>' +
611-
'</button>' +
612-
'<ul class="dropdown-menu dropdown-menu-right dropdown-menu-selectable">' +
613-
'<li>' +
614-
'<a class="" href="#">Passed</a>' +
615-
'<a class="is-active" href="#">Failed</a>' +
616-
'</li>' +
617-
'</ul>' +
618-
'</div>' +
619-
'</div>';
620-
621-
this.parseHtmlAndAppend(
622-
document.querySelector('.filtered-search-block'),
623-
menu
624-
);
625-
}
626601
}
627602

628603
let cs = new ContentScript();
629-
}(this));
604+
}(this));

js/options.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
this.jiraTicketLinkLabelTypeRadioButtons = Array.from(document.querySelectorAll('input[name="jira_ticket_link_label_type"]'));
3838

3939
this.enableButtonToToggleWipStatusCheckbox = document.querySelector('input#enable_button_to_toggle_wip_status');
40-
41-
this.enableMenuToHideMrsBasedOnPipelineStatus = document.querySelector('input#enable_menu_to_hide_mrs_based_on_pipeline_status');
4240
}
4341

4442
/**
@@ -69,9 +67,6 @@
6967

7068
self.enableButtonToToggleWipStatusCheckbox.checked = preferences.enable_button_to_toggle_wip_status;
7169
self.enableButtonToToggleWipStatusCheckbox.dispatchEvent(new CustomEvent('change'));
72-
73-
self.enableMenuToHideMrsBasedOnPipelineStatus.checked = preferences.enable_menu_to_hide_mrs_based_on_pipeline_status;
74-
self.enableMenuToHideMrsBasedOnPipelineStatus.dispatchEvent(new CustomEvent('change'));
7570
});
7671
}
7772

@@ -122,10 +117,6 @@
122117
this.enableButtonToToggleWipStatusCheckbox.addEventListener('change', function() {
123118
self.forceUserToEnableAtLeastOneFeatureIfNecessarily();
124119
});
125-
126-
this.enableMenuToHideMrsBasedOnPipelineStatus.addEventListener('change', function() {
127-
self.forceUserToEnableAtLeastOneFeatureIfNecessarily();
128-
});
129120
}
130121

131122
/**
@@ -147,8 +138,7 @@
147138
enable_jira_ticket_link: this.enableJiraTicketLinkCheckbox.checked,
148139
base_jira_url: this.baseJiraUrlInput.value,
149140
jira_ticket_link_label_type: jira_ticket_link_label_type,
150-
enable_button_to_toggle_wip_status: this.enableButtonToToggleWipStatusCheckbox.checked,
151-
enable_menu_to_hide_mrs_based_on_pipeline_status: this.enableMenuToHideMrsBasedOnPipelineStatus.checked
141+
enable_button_to_toggle_wip_status: this.enableButtonToToggleWipStatusCheckbox.checked
152142
},
153143
function() {
154144
self.setSuccessfulVisualFeedbackOnSubmitButton();
@@ -183,8 +173,7 @@
183173
return !this.displaySourceAndTargetBranchesCheckbox.checked
184174
&& !this.enableButtonToCopyMrInfoCheckbox.checked
185175
&& !this.enableJiraTicketLinkCheckbox.checked
186-
&& !this.enableButtonToToggleWipStatusCheckbox.checked
187-
&& !this.enableMenuToHideMrsBasedOnPipelineStatus.checked;
176+
&& !this.enableButtonToToggleWipStatusCheckbox.checked;
188177
}
189178

190179
/**

js/preferences.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
enable_jira_ticket_link: false,
1414
base_jira_url: '',
1515
jira_ticket_link_label_type: 'ticket_id',
16-
enable_button_to_toggle_wip_status: true,
17-
enable_menu_to_hide_mrs_based_on_pipeline_status: true
16+
enable_button_to_toggle_wip_status: true
1817
};
1918
}
2019

0 commit comments

Comments
 (0)