From b44a1e3cb66e3687e7725a121bc739557cdc178e Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Fri, 6 May 2016 15:23:02 -0400 Subject: [PATCH 1/2] Remove diff comment toggle button --- app/assets/javascripts/application.js.coffee | 6 ------ app/views/projects/diffs/_file.html.haml | 5 ----- features/steps/project/merge_requests.rb | 12 ------------ 3 files changed, 23 deletions(-) diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 5bac8eef1cb6..611c464b4b5d 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -205,12 +205,6 @@ $ -> $('.header-content .navbar-collapse').toggle() $('.navbar-toggle').toggleClass('active') - # Show/hide comments on diff - $("body").on "click", ".js-toggle-diff-comments", (e) -> - $(@).toggleClass('active') - $(@).closest(".diff-file").find(".notes_holder").toggle() - e.preventDefault() - $(document).off "click", '.js-confirm-danger' $(document).on "click", '.js-confirm-danger', (e) -> e.preventDefault() diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index 0f04fc5d33c5..f8ed47d61571 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -27,11 +27,6 @@ = "#{diff_file.diff.a_mode} → #{diff_file.diff.b_mode}" .file-actions.hidden-xs - - if blob_text_viewable?(blob) - = link_to '#', class: 'js-toggle-diff-comments btn active has-tooltip btn-file-option', title: "Toggle comments for this file" do - = icon('comment') - \ - - if editable_diff?(diff_file) = edit_blob_link(@merge_request.source_project, @merge_request.source_branch, diff_file.new_path, diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 3b1a00f628af..c63d722a3de5 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -402,18 +402,6 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps end end - step 'I click link "Hide inline discussion" of the third file' do - page.within '.files [id^=diff]:nth-child(3)' do - find('.js-toggle-diff-comments').trigger('click') - end - end - - step 'I click link "Show inline discussion" of the third file' do - page.within '.files [id^=diff]:nth-child(3)' do - find('.js-toggle-diff-comments').trigger('click') - end - end - step 'I should not see a comment like "Line is wrong" in the third file' do page.within '.files [id^=diff]:nth-child(3)' do expect(page).not_to have_visible_content "Line is wrong" -- GitLab From 8c058e8563c287817b81a9a122ceeb5a69f6b221 Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Fri, 6 May 2016 15:26:06 -0400 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 78d6c1ec2b2f..b18276e71c6b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -29,6 +29,7 @@ v 8.8.0 (unreleased) - Fix Gravatar hint in user profile when Gravatar is disabled. !3988 (Artem Sidorenko) - Expire repository exists? and has_visible_content? caches after a push if necessary - Fix unintentional filtering bug in issues sorted by milestone due (Takuya Noguchi) + - Remove the toggle comments button. v 8.7.3 - Emails, Gitlab::Email::Message, Gitlab::Diff, and Premailer::Adapter::Nokogiri are now instrumented -- GitLab