diff --git a/CHANGELOG b/CHANGELOG index 2270341bcfbba892e8bd1997ca5351aefffb7dcf..d79b1f7a8fcd85a4fa1aa6c5b151cbd8b2d40ef1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,7 +4,7 @@ v 6.4.0 - Fixed another 500 error with submodules - UI: More compact issues page - Minimal password length increased to 8 symbols - - Parallel diff view (Steven Thonus) + - Side-by-side diff view (Steven Thonus) v 6.3.0 - API for adding gitlab-ci service diff --git a/app/views/projects/commits/_diffs.html.haml b/app/views/projects/commits/_diffs.html.haml index aec7f15cdb79e19436a66a33ca4ed475eac3a389..2a32f56e8f0d9b216600d8053e99ec8bd139c2c5 100644 --- a/app/views/projects/commits/_diffs.html.haml +++ b/app/views/projects/commits/_diffs.html.haml @@ -31,9 +31,9 @@ and %strong.cred #{@commit.stats.deletions} deletions - if params[:view] == 'parallel' - = link_to "Unified Diff", url_for(view: 'unified'), {id: "commit-diff-viewtype", class: 'btn btn-tiny pull-right'} + = link_to "Inline Diff", url_for(view: 'inline'), {id: "commit-diff-viewtype", class: 'btn btn-tiny pull-right'} - else - = link_to "Parallel Diff", url_for(view: 'parallel'), {id: "commit-diff-viewtype", class: 'btn btn-tiny pull-right'} + = link_to "Side-by-side Diff", url_for(view: 'parallel'), {id: "commit-diff-viewtype", class: 'btn btn-tiny pull-right'} .file-stats = render "projects/commits/diff_head", diffs: diffs diff --git a/app/views/projects/commits/_parallel_view.html.haml b/app/views/projects/commits/_parallel_view.html.haml index 6585bd140a12204419d19d089ac95e087c2c37ac..3234e9da0ac88fa923ee22fb156ea49cdc5e56db 100644 --- a/app/views/projects/commits/_parallel_view.html.haml +++ b/app/views/projects/commits/_parallel_view.html.haml @@ -1,4 +1,4 @@ -/ Parallel diff view +/ Side-by-side diff view - old_file = get_old_file(project, @commit, diff) - deleted_lines = {} - added_lines = {} diff --git a/features/project/commits/commits.feature b/features/project/commits/commits.feature index 97113871a0a4335f02b5c9cb3f026df2249b3311..cbe8b3215071c62cf55c49f1c4885db2fdb47fc8 100644 --- a/features/project/commits/commits.feature +++ b/features/project/commits/commits.feature @@ -14,12 +14,12 @@ Feature: Project Browse commits Scenario: I browse commit from list Given I click on commit link Then I see commit info - And I see parallel diff button + And I see side-by-side diff button - Scenario: I browse commit with parallel diff view + Scenario: I browse commit with side-by-side diff view Given I click on commit link - And I click parallel diff button - Then I see unified diff button + And I click side-by-side diff button + Then I see inline diff button Scenario: I compare refs Given I visit compare refs page diff --git a/features/steps/project/project_browse_commits.rb b/features/steps/project/project_browse_commits.rb index 17c51dc9a96c67be47e29c1c004f75bb6f4c4bc3..0376c8926964f2ebfe448e50735e4ae3fbd6af33 100644 --- a/features/steps/project/project_browse_commits.rb +++ b/features/steps/project/project_browse_commits.rb @@ -89,16 +89,16 @@ class ProjectBrowseCommits < Spinach::FeatureSteps links[1]['href'].should =~ %r{blob/cc1ba255d6c5ffdce87a357ba7ccc397a4f4026b} end - Given 'I click parallel diff button' do - click_link "Parallel Diff" + Given 'I click side-by-side diff button' do + click_link "side-by-side Diff" end - Then 'I see parallel diff button' do - page.should have_content "Parallel Diff" + Then 'I see side-by-side diff button' do + page.should have_content "Side-by-side Diff" end - Then 'I see unified diff button' do - page.should have_content "Unified Diff" + Then 'I see inline diff button' do + page.should have_content "Inline Diff" end end diff --git a/vendor/assets/javascripts/ace-src-noconflict/mode-diff.js b/vendor/assets/javascripts/ace-src-noconflict/mode-diff.js index 75e26cc7056752f3cb5f37813a44fcca7a10a413..8d1e7cee0967542ba1804c8a90fbbd8f096ae4e3 100644 --- a/vendor/assets/javascripts/ace-src-noconflict/mode-diff.js +++ b/vendor/assets/javascripts/ace-src-noconflict/mode-diff.js @@ -66,7 +66,7 @@ var DiffHighlightRules = function() { "regex": "^(?:\\*{15}|={67}|-{3}|\\+{3})$", "token": "punctuation.definition.separator.diff", "name": "keyword" - }, { //diff.range.unified + }, { //diff.range.inline "regex": "^(@@)(\\s*.+?\\s*)(@@)(.*)$", "token": [ "constant",