Commit 7e1715d0 authored by Nick Thomas's avatar Nick Thomas

Remove the approvals_commented_by feature flag

This has been enabled by default for a long time now.

Changelog: removed
parent 8fc42807
...@@ -30,7 +30,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -30,7 +30,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
before_action :check_user_can_push_to_source_branch!, only: [:rebase] before_action :check_user_can_push_to_source_branch!, only: [:rebase]
before_action only: [:show] do before_action only: [:show] do
push_frontend_feature_flag(:file_identifier_hash) push_frontend_feature_flag(:file_identifier_hash)
push_frontend_feature_flag(:approvals_commented_by, @project, default_enabled: true)
push_frontend_feature_flag(:merge_request_widget_graphql, @project, default_enabled: :yaml) push_frontend_feature_flag(:merge_request_widget_graphql, @project, default_enabled: :yaml)
push_frontend_feature_flag(:default_merge_ref_for_diffs, @project, default_enabled: :yaml) push_frontend_feature_flag(:default_merge_ref_for_diffs, @project, default_enabled: :yaml)
push_frontend_feature_flag(:core_security_mr_widget_counts, @project) push_frontend_feature_flag(:core_security_mr_widget_counts, @project)
......
---
name: approvals_commented_by
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38136
rollout_issue_url:
milestone: '13.3'
type: development
group: group::source code
default_enabled: true
...@@ -94,15 +94,12 @@ export default { ...@@ -94,15 +94,12 @@ export default {
<template> <template>
<table class="table m-0"> <table class="table m-0">
<thead class="thead-white text-nowrap"> <thead class="thead-white text-nowrap">
<tr <tr class="d-md-table-row d-none">
:class="glFeatures.approvalsCommentedBy ? 'd-md-table-row' : 'd-sm-table-row'"
class="d-none"
>
<th class="w-0"></th> <th class="w-0"></th>
<th class="w-25 gl-pl-0!">{{ s__('MRApprovals|Approvers') }}</th> <th class="w-25 gl-pl-0!">{{ s__('MRApprovals|Approvers') }}</th>
<th class="w-50"></th> <th class="w-50"></th>
<th>{{ s__('MRApprovals|Approvals') }}</th> <th>{{ s__('MRApprovals|Approvals') }}</th>
<th v-if="glFeatures.approvalsCommentedBy">{{ s__('MRApprovals|Commented by') }}</th> <th>{{ s__('MRApprovals|Commented by') }}</th>
<th>{{ s__('MRApprovals|Approved by') }}</th> <th>{{ s__('MRApprovals|Approved by') }}</th>
</tr> </tr>
</thead> </thead>
...@@ -116,10 +113,7 @@ export default { ...@@ -116,10 +113,7 @@ export default {
<tr v-for="rule in rules" :key="rule.id"> <tr v-for="rule in rules" :key="rule.id">
<td class="w-0 gl-pr-4!"><approved-icon class="gl-pl-2" :is-approved="rule.approved" /></td> <td class="w-0 gl-pr-4!"><approved-icon class="gl-pl-2" :is-approved="rule.approved" /></td>
<td :colspan="rule.rule_type === $options.ruleTypeAnyApprover ? 2 : 1" class="gl-pl-0!"> <td :colspan="rule.rule_type === $options.ruleTypeAnyApprover ? 2 : 1" class="gl-pl-0!">
<div <div class="d-md-flex d-none js-name align-items-center">
:class="glFeatures.approvalsCommentedBy ? 'd-md-flex' : 'd-sm-flex'"
class="d-none js-name align-items-center"
>
<empty-rule-name <empty-rule-name
v-if="rule.rule_type === $options.ruleTypeAnyApprover" v-if="rule.rule_type === $options.ruleTypeAnyApprover"
:eligible-approvers-docs-path="eligibleApproversDocsPath" :eligible-approvers-docs-path="eligibleApproversDocsPath"
...@@ -140,10 +134,7 @@ export default { ...@@ -140,10 +134,7 @@ export default {
:security-approvals-help-page-path="securityApprovalsHelpPagePath" :security-approvals-help-page-path="securityApprovalsHelpPagePath"
/> />
</div> </div>
<div <div class="d-md-none d-flex flex-column js-summary">
:class="glFeatures.approvalsCommentedBy ? 'd-md-none' : 'd-sm-none'"
class="d-flex flex-column js-summary"
>
<empty-rule-name <empty-rule-name
v-if="rule.rule_type === $options.ruleTypeAnyApprover" v-if="rule.rule_type === $options.ruleTypeAnyApprover"
:eligible-approvers-docs-path="eligibleApproversDocsPath" :eligible-approvers-docs-path="eligibleApproversDocsPath"
...@@ -156,10 +147,7 @@ export default { ...@@ -156,10 +147,7 @@ export default {
:img-size="24" :img-size="24"
empty-text="" empty-text=""
/> />
<div <div v-if="rule.commented_by.length > 0" class="mt-2">
v-if="glFeatures.approvalsCommentedBy && rule.commented_by.length > 0"
class="mt-2"
>
<span>{{ s__('MRApprovals|Commented by') }}</span> <span>{{ s__('MRApprovals|Commented by') }}</span>
<user-avatar-list <user-avatar-list
class="d-inline-block align-middle" class="d-inline-block align-middle"
...@@ -179,22 +167,14 @@ export default { ...@@ -179,22 +167,14 @@ export default {
</td> </td>
<td <td
v-if="rule.rule_type !== $options.ruleTypeAnyApprover" v-if="rule.rule_type !== $options.ruleTypeAnyApprover"
:class="glFeatures.approvalsCommentedBy ? 'd-md-table-cell' : 'd-sm-table-cell'" class="d-md-table-cell d-none js-approvers"
class="d-none js-approvers"
> >
<div><user-avatar-list :items="rule.approvers" :img-size="24" empty-text="" /></div> <div><user-avatar-list :items="rule.approvers" :img-size="24" empty-text="" /></div>
</td> </td>
<td <td class="d-md-table-cell w-0 d-none text-nowrap js-pending">
:class="glFeatures.approvalsCommentedBy ? 'd-md-table-cell' : 'd-sm-table-cell'"
class="w-0 d-none text-nowrap js-pending"
>
{{ pendingApprovalsText(rule) }} {{ pendingApprovalsText(rule) }}
</td> </td>
<td <td class="d-md-table-cell d-none js-commented-by">
v-if="glFeatures.approvalsCommentedBy"
:class="glFeatures.approvalsCommentedBy ? 'd-md-table-cell' : 'd-sm-table-cell'"
class="d-none js-commented-by"
>
<user-avatar-list :items="rule.commented_by" :img-size="24" empty-text="" /> <user-avatar-list :items="rule.commented_by" :img-size="24" empty-text="" />
</td> </td>
<td class="d-none d-md-table-cell js-approved-by"> <td class="d-none d-md-table-cell js-approved-by">
......
...@@ -59,16 +59,9 @@ const testRules = () => [testRuleApproved(), testRuleUnapproved(), testRuleOptio ...@@ -59,16 +59,9 @@ const testRules = () => [testRuleApproved(), testRuleUnapproved(), testRuleOptio
describe('EE MRWidget approvals list', () => { describe('EE MRWidget approvals list', () => {
let wrapper; let wrapper;
const createComponent = (props = {}, options = {}) => { const createComponent = (props = {}) => {
const { approvalsCommentedBy = true } = options;
wrapper = shallowMount(ApprovalsList, { wrapper = shallowMount(ApprovalsList, {
propsData: props, propsData: props,
provide: {
glFeatures: {
approvalsCommentedBy,
},
},
}); });
}; };
...@@ -361,35 +354,4 @@ describe('EE MRWidget approvals list', () => { ...@@ -361,35 +354,4 @@ describe('EE MRWidget approvals list', () => {
expect(ruleSection.at(1).text()).toEqual(rule.section); expect(ruleSection.at(1).text()).toEqual(rule.section);
}); });
}); });
describe('approvalsCommentedBy feature flag is off', () => {
let row;
beforeEach(() => {
const rule = testRuleApproved();
createComponent(
{
approvalRules: [rule],
},
{ approvalsCommentedBy: false },
);
row = findRows().at(0);
});
it('does not render commented by in table head', () => {
expect(wrapper.find('thead').text()).not.toContain('Commented by');
});
it('does not render commented by in summary text', () => {
const summary = findRowElement(row, 'summary');
expect(summary.findAll(UserAvatarList).length).toBe(2);
});
it('does not render commented by in user avatar list', () => {
const commentedBy = findRowElement(row, 'commented-by');
expect(commentedBy.exists()).toBe(false);
});
});
}); });
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