diff options
-rw-r--r-- | app/models/merge_request.rb | 3 | ||||
-rw-r--r-- | app/models/suggestion.rb | 6 | ||||
-rw-r--r-- | app/views/projects/merge_requests/show.html.haml | 5 | ||||
-rw-r--r-- | lib/banzai/filter/suggestion_filter.rb | 1 | ||||
-rw-r--r-- | spec/lib/banzai/filter/suggestion_filter_spec.rb | 9 |
5 files changed, 4 insertions, 20 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 8052a54c504..84cb581d437 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -364,8 +364,7 @@ class MergeRequest < ActiveRecord::Base end def supports_suggestion? - # Should be `true` when removing the FF. - Suggestion.feature_enabled? + true end # Calls `MergeWorker` to proceed with the merge process and diff --git a/app/models/suggestion.rb b/app/models/suggestion.rb index cec5ea30f9d..c76b8e71507 100644 --- a/app/models/suggestion.rb +++ b/app/models/suggestion.rb @@ -1,8 +1,6 @@ # frozen_string_literal: true class Suggestion < ApplicationRecord - FEATURE_FLAG = :diff_suggestions - belongs_to :note, inverse_of: :suggestions validates :note, presence: true validates :commit_id, presence: true, if: :applied? @@ -10,10 +8,6 @@ class Suggestion < ApplicationRecord delegate :original_position, :position, :diff_file, :noteable, to: :note - def self.feature_enabled? - Feature.enabled?(FEATURE_FLAG) - end - def project noteable.source_project end diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 3f2e59d05e3..cc9292b54d7 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -5,6 +5,7 @@ - page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "Merge Requests" - page_description @merge_request.description - page_card_attributes @merge_request.card_attributes +- suggest_changes_help_path = help_page_path('user/discussions/index.md', anchor: 'suggest-changes') .merge-request{ data: { mr_action: j(params[:tab].presence || 'show'), url: merge_request_path(@merge_request, format: :json), project_path: project_path(@merge_request.project) } } = render "projects/merge_requests/mr_title" @@ -67,7 +68,7 @@ noteable_data: serialize_issuable(@merge_request), noteable_type: 'MergeRequest', target_type: 'merge_request', - help_page_path: nil, + help_page_path: suggest_changes_help_path, current_user_data: UserSerializer.new(project: @project).represent(current_user, {}, MergeRequestUserEntity).to_json} } #commits.commits.tab-pane @@ -77,7 +78,7 @@ = render 'projects/commit/pipelines_list', disable_initialization: true, endpoint: pipelines_project_merge_request_path(@project, @merge_request) #js-diffs-app.diffs.tab-pane{ data: { "is-locked" => @merge_request.discussion_locked?, endpoint: diffs_project_merge_request_path(@project, @merge_request, 'json', request.query_parameters), - help_page_path: nil, + help_page_path: suggest_changes_help_path, current_user_data: UserSerializer.new(project: @project).represent(current_user, {}, MergeRequestUserEntity).to_json, project_path: project_path(@merge_request.project), changes_empty_state_illustration: image_path('illustrations/merge_request_changes_empty.svg') } } diff --git a/lib/banzai/filter/suggestion_filter.rb b/lib/banzai/filter/suggestion_filter.rb index 822db7cf26e..307ea449140 100644 --- a/lib/banzai/filter/suggestion_filter.rb +++ b/lib/banzai/filter/suggestion_filter.rb @@ -7,7 +7,6 @@ module Banzai TAG_CLASS = 'js-render-suggestion'.freeze def call - return doc unless Suggestion.feature_enabled? return doc unless suggestions_filter_enabled? doc.search('pre.suggestion > code').each do |node| diff --git a/spec/lib/banzai/filter/suggestion_filter_spec.rb b/spec/lib/banzai/filter/suggestion_filter_spec.rb index 55a141bf315..b13c90b54bd 100644 --- a/spec/lib/banzai/filter/suggestion_filter_spec.rb +++ b/spec/lib/banzai/filter/suggestion_filter_spec.rb @@ -17,15 +17,6 @@ describe Banzai::Filter::SuggestionFilter do expect(result[:class]).to include('js-render-suggestion') end - it 'includes no `js-render-suggestion` when feature disabled' do - stub_feature_flags(diff_suggestions: false) - - doc = filter(input, default_context) - result = doc.css('code').first - - expect(result[:class]).to be_nil - end - it 'includes no `js-render-suggestion` when filter is disabled' do doc = filter(input) result = doc.css('code').first |