Commit 6c9907a3 authored by Kerri Miller's avatar Kerri Miller Committed by Vitali Tatarintev

Remove batch_suggestions feature flag

Flag was added in 13.1 and has been default true for some time..
parent 6bef7336
<script> <script>
import { GlButton, GlLoadingIcon, GlTooltipDirective, GlIcon } from '@gitlab/ui'; import { GlButton, GlLoadingIcon, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import ApplySuggestion from './apply_suggestion.vue'; import ApplySuggestion from './apply_suggestion.vue';
export default { export default {
components: { GlIcon, GlButton, GlLoadingIcon, ApplySuggestion }, components: { GlIcon, GlButton, GlLoadingIcon, ApplySuggestion },
directives: { 'gl-tooltip': GlTooltipDirective }, directives: { 'gl-tooltip': GlTooltipDirective },
mixins: [glFeatureFlagsMixin()],
props: { props: {
batchSuggestionsCount: { batchSuggestionsCount: {
type: Number, type: Number,
...@@ -59,9 +57,6 @@ export default { ...@@ -59,9 +57,6 @@ export default {
}; };
}, },
computed: { computed: {
canBeBatched() {
return Boolean(this.glFeatures.batchSuggestions);
},
isApplying() { isApplying() {
return this.isApplyingSingle || this.isApplyingBatch; return this.isApplyingSingle || this.isApplyingBatch;
}, },
...@@ -118,7 +113,7 @@ export default { ...@@ -118,7 +113,7 @@ export default {
<gl-loading-icon class="d-flex-center mr-2" /> <gl-loading-icon class="d-flex-center mr-2" />
<span>{{ applyingSuggestionsMessage }}</span> <span>{{ applyingSuggestionsMessage }}</span>
</div> </div>
<div v-else-if="canApply && canBeBatched && isBatched" class="d-flex align-items-center"> <div v-else-if="canApply && isBatched" class="d-flex align-items-center">
<gl-button <gl-button
class="btn-inverted js-remove-from-batch-btn btn-grouped" class="btn-inverted js-remove-from-batch-btn btn-grouped"
:disabled="isApplying" :disabled="isApplying"
...@@ -142,7 +137,7 @@ export default { ...@@ -142,7 +137,7 @@ export default {
</div> </div>
<div v-else class="d-flex align-items-center"> <div v-else class="d-flex align-items-center">
<gl-button <gl-button
v-if="suggestionsCount > 1 && canBeBatched && !isDisableButton" v-if="suggestionsCount > 1 && !isDisableButton"
class="btn-inverted js-add-to-batch-btn btn-grouped" class="btn-inverted js-add-to-batch-btn btn-grouped"
data-qa-selector="add_suggestion_batch_button" data-qa-selector="add_suggestion_batch_button"
:disabled="isDisableButton" :disabled="isDisableButton"
......
...@@ -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(:batch_suggestions, @project, default_enabled: true)
push_frontend_feature_flag(:approvals_commented_by, @project, default_enabled: true) 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(:drag_comment_selection, @project, default_enabled: true) push_frontend_feature_flag(:drag_comment_selection, @project, default_enabled: true)
......
---
title: Remove batch_suggestions feature flag
merge_request: 57745
author:
type: other
---
name: batch_suggestions
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34782
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/320755
milestone: '13.1'
type: development
group: group::code review
default_enabled: true
...@@ -486,11 +486,9 @@ introduced by [#25381](https://gitlab.com/gitlab-org/gitlab/-/issues/25381). ...@@ -486,11 +486,9 @@ introduced by [#25381](https://gitlab.com/gitlab-org/gitlab/-/issues/25381).
### Batch Suggestions ### Batch Suggestions
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/25486) in GitLab 13.1 as an [alpha feature](https://about.gitlab.com/handbook/product/gitlab-the-product/#alpha). > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/25486) in GitLab 13.1 as an [alpha feature](https://about.gitlab.com/handbook/product/gitlab-the-product/#alpha) behind a feature flag, disabled by default.
> - Deployed behind a feature flag, disabled by default.
> - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/227799) in GitLab 13.2. > - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/227799) in GitLab 13.2.
> - Enabled on GitLab.com. > - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/320755) in GitLab 13.11.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-batch-suggestions).
You can apply multiple suggestions at once to reduce the number of commits added You can apply multiple suggestions at once to reduce the number of commits added
to your branch to address your reviewers' requests. to your branch to address your reviewers' requests.
...@@ -540,7 +538,7 @@ You can assign an issue to a user who made a comment. ...@@ -540,7 +538,7 @@ You can assign an issue to a user who made a comment.
In the comment, click the **More Actions** menu and click **Assign to commenting user**. In the comment, click the **More Actions** menu and click **Assign to commenting user**.
Click the button again to unassign the commenter. Click the button again to unassign the commenter.
![Assign to commenting user](img/quickly_assign_commenter_v13_1.png) ![Assign to commenting user](img/quickly_assign_commenter_v13_1.png)
...@@ -562,24 +560,3 @@ To disable it: ...@@ -562,24 +560,3 @@ To disable it:
```ruby ```ruby
Feature.disable(:confidential_notes) Feature.disable(:confidential_notes)
``` ```
## Enable or disable Batch Suggestions **(FREE SELF)**
Batch Suggestions is
deployed behind a feature flag that is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../administration/feature_flags.md)
can opt to disable it for your instance.
To enable it:
```ruby
# Instance-wide
Feature.enable(:batch_suggestions)
```
To disable it:
```ruby
# Instance-wide
Feature.disable(:batch_suggestions)
```
...@@ -16,18 +16,12 @@ const DEFAULT_PROPS = { ...@@ -16,18 +16,12 @@ const DEFAULT_PROPS = {
describe('Suggestion Diff component', () => { describe('Suggestion Diff component', () => {
let wrapper; let wrapper;
const createComponent = (props, glFeatures = {}) => { const createComponent = (props) => {
wrapper = shallowMount(SuggestionDiffHeader, { wrapper = shallowMount(SuggestionDiffHeader, {
propsData: { propsData: {
...DEFAULT_PROPS, ...DEFAULT_PROPS,
...props, ...props,
}, },
provide: {
glFeatures: {
batchSuggestions: true,
...glFeatures,
},
},
}); });
}; };
...@@ -211,18 +205,6 @@ describe('Suggestion Diff component', () => { ...@@ -211,18 +205,6 @@ describe('Suggestion Diff component', () => {
}); });
}); });
describe('batchSuggestions feature flag is set to false', () => {
beforeEach(() => {
createComponent({}, { batchSuggestions: false });
});
it('disables add to batch buttons but keeps apply suggestion enabled', () => {
expect(findApplyButton().exists()).toBe(true);
expect(findAddToBatchButton().exists()).toBe(false);
expect(findApplyButton().attributes('disabled')).not.toBe('true');
});
});
describe('canApply is set to false', () => { describe('canApply is set to false', () => {
beforeEach(() => { beforeEach(() => {
createComponent({ canApply: false }); createComponent({ canApply: 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