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

Commit f6c7282

Browse files
committed
Revert stuff
1 parent 056e319 commit f6c7282

File tree

4 files changed

+4
-52
lines changed

4 files changed

+4
-52
lines changed

html/options.html

-11
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

+1-26
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
* Determines if the project do uses the Gitlab "pipeline" feature.
190190
*/
191191
isPipelineFeatureEnabled() {
192-
return false;// document.querySelector('.nav-sidebar .shortcuts-pipelines') ? true : false;
192+
return document.querySelector('.nav-sidebar .shortcuts-pipelines') ? true : false;
193193
}
194194

195195
/**
@@ -231,10 +231,6 @@
231231
if (self.userAuthenticated && self.preferences.enable_button_to_toggle_wip_status) {
232232
self.attachClickEventToToggleWipStatusButtons();
233233
}
234-
235-
if (self.pipelineFeatureEnabled && self.preferences.enable_menu_to_hide_mrs_based_on_pipeline_status) {
236-
self.addHideMrsByPipelineStatusMenu();
237-
}
238234
});
239235
}
240236

@@ -579,27 +575,6 @@
579575
return placeholders[placeholder];
580576
}).trim();
581577
}
582-
583-
addHideMrsByPipelineStatusMenu() {
584-
let menu = '<div class="filter-dropdown-container d-flex flex-column flex-md-row">' +
585-
'<div class="dropdown inline prepend-left-10">' +
586-
'<button class="btn btn-default dropdown-menu-toggle" data-display="static" data-toggle="dropdown" type="button">' +
587-
'Pipeline status <i aria-hidden="true" class="fa fa-chevron-down"></i>' +
588-
'</button>' +
589-
'<ul class="dropdown-menu dropdown-menu-right dropdown-menu-selectable">' +
590-
'<li>' +
591-
'<a class="" href="#">Passed</a>' +
592-
'<a class="is-active" href="#">Failed</a>' +
593-
'</li>' +
594-
'</ul>' +
595-
'</div>' +
596-
'</div>';
597-
598-
this.parseHtmlAndAppend(
599-
document.querySelector('.filtered-search-block'),
600-
menu
601-
);
602-
}
603578
}
604579

605580
let cs = new ContentScript();

js/options.js

+2-13
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

+1-2
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)