Commit de6266d6 authored by Fatih Acet's avatar Fatih Acet

Merge branch '27920-both-wip-messages-showing' into 'master'

Dispatch needed JS when creating a new MR in diff view

Closes #27920

See merge request !9238
parents 02443d1d 3c4dc433
...@@ -118,6 +118,7 @@ const ShortcutsBlob = require('./shortcuts_blob'); ...@@ -118,6 +118,7 @@ const ShortcutsBlob = require('./shortcuts_blob');
new gl.IssuableTemplateSelectors(); new gl.IssuableTemplateSelectors();
break; break;
case 'projects:merge_requests:new': case 'projects:merge_requests:new':
case 'projects:merge_requests:new_diffs':
case 'projects:merge_requests:edit': case 'projects:merge_requests:edit':
new gl.Diff(); new gl.Diff();
shortcut_handler = new ShortcutsNavigation(); shortcut_handler = new ShortcutsNavigation();
......
...@@ -83,7 +83,6 @@ class Projects::ApplicationController < ApplicationController ...@@ -83,7 +83,6 @@ class Projects::ApplicationController < ApplicationController
end end
def apply_diff_view_cookie! def apply_diff_view_cookie!
@show_changes_tab = params[:view].present?
cookies.permanent[:diff_view] = params.delete(:view) if params[:view].present? cookies.permanent[:diff_view] = params.delete(:view) if params[:view].present?
end end
......
...@@ -245,6 +245,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -245,6 +245,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
respond_to do |format| respond_to do |format|
format.html do format.html do
define_new_vars define_new_vars
@show_changes_tab = true
render "new" render "new"
end end
format.json do format.json do
...@@ -616,6 +617,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -616,6 +617,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@labels = LabelsFinder.new(current_user, project_id: @project.id).execute @labels = LabelsFinder.new(current_user, project_id: @project.id).execute
@show_changes_tab = params[:show_changes].present?
define_pipelines_vars define_pipelines_vars
end end
......
---
title: Dispatch needed JS when creating a new MR in diff view
merge_request:
author:
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