Commit Graph
60 Commits
Author SHA1 Message Date
Luke "Jared" Bennett a9d14ddced added whitespace toggle to diffs page and set it to return the project compare path with the selected whitespace params
Updated CHANGELOG

Moved CHANGELOG entry
2016-06-10 17:31:28 +01:00
Grzegorz Bizon c370dce01c Enable Style/RedundantParentheses rubocop cop
See #17478
2016-05-30 15:07:18 +02:00
Adam ButlerandRémy Coutable 8a8b5497c5 Create DiffFilter and change SystemNoteService#change_title to use Gitlab::Diff::InlineDiff 2016-05-18 11:15:10 -05:00
Douwe Maan 99d3e21f19 Extract LegacyDiffNote out of Note 2016-05-13 17:31:43 -05:00
Alfredo Sumaran 22bd7f4d83 Allow to pass custom classes to button 2016-04-26 14:01:40 -05:00
Alfredo Sumaran 99296b2efd Hide button on mobile 2016-04-26 14:01:40 -05:00
Alfredo Sumaran 5ba79f49a4 Syntax and code improvements 2016-04-26 14:01:40 -05:00
Alfredo Sumaran 66a5d0fd26 Rename method 2016-04-26 14:01:40 -05:00
Alfredo Sumaran 64c2d9bd3c Use new method hide_whitespaces? 2016-04-26 14:01:40 -05:00
Alfredo Sumaran d8d00b5bc2 Add Hide/show whitespace changes button on diff and commit view 2016-04-26 14:01:40 -05:00
Robert Speicher 90a67a76d5 Always read diff_view setting from the cookie
Prior, when the user had their view set to "parallel" and then visited a
merge request's changes tab _without_ passing the `view` parameter via
query string, the view would be parallel but the `Notes` class was
always instantiated with the default value from `diff_view` ("inline"),
resulting in broken markup when the form to add a line note was
dynamically inserted.

The cookie is set whenever the view is changed, so this value should
always be up-to-date.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14557
2016-04-14 17:38:34 -04:00
Annabel Dunstone 80d8f8b876 Syntax & style updates 2016-04-14 12:33:29 -05:00
Annabel Dunstone 82d0221b63 Add line type conditional to diff line helper 2016-04-14 09:10:40 -05:00
Annabel Dunstone 7030ffb0e0 Copying and pasting doesn't grab line numbers or +/- 2016-04-14 09:10:40 -05:00
Jacob Vosmaer 1764e1b7cb Use Gitlab::Git::DiffCollections 2016-03-03 18:38:44 +01:00
Alfredo Sumaran 84d1b350d4 Fixes syntax error 2016-02-19 17:20:39 -05:00
Alfredo Sumaran 27a0310f23 Make diff view name getter less error prone 2016-02-19 16:32:29 -05:00
Rémy Coutable 42c2064a36 Sort line notes used in parallel diff by created_at
Fixes #13464.
2016-02-17 16:31:14 +01:00
Douwe Maan 47afe7ae8f Fewer html_safes 2016-01-30 12:54:19 +01:00
Douwe Maan 677b4db9e6 Mark inline difference between old and new paths when a file is renamed 2016-01-29 19:37:17 +01:00
Douwe Maan 577f2fb47a Save and use actual diff base commit for MR diff highlighting 2016-01-20 18:44:27 +01:00
Douwe Maan 88bd138513 Restore helper 2016-01-20 14:59:14 +01:00
Douwe Maan 701513dcc7 Move parallel diff logic to separate class 2016-01-20 14:53:20 +01:00
Rubén Dávila 6b9c730e91 More refactoring from last code review. #3945
* Use commit objects instead of IDs when generating diffs
* Use proper references when generating MR's source and target
* Update broken specs
2016-01-14 16:47:55 -05:00
Douwe Maan c881627d11 Refactor parallel_diff generation a bit. 2016-01-14 14:52:08 +01:00
Rubén Dávila 0f0af19139 Little refactor for usage of html_safe. #3945 2016-01-13 11:39:15 -05:00
Rubén Dávila c0385488fb Fix broken spec. #3945 2016-01-12 15:12:30 -05:00
Rubén Dávila 80a4c808b1 Make diff_line_content helper return a safe String. #3945 2016-01-12 11:02:16 -05:00
Rubén Dávila 21b602c60a Change strategy to highlight diffs. #3945
Now we apply syntax highlighting to the whole old and new files.
This basically help us to highlight adequately multiline content.
2016-01-07 22:37:01 -05:00
Rubén Dávila 7de90f4b53 Fix broken spec and small refactor. #3945 2015-12-30 18:42:11 -05:00
Rubén Dávila bb96d63153 New implementation for highlighting diff files. #3945
* It is more performant given now we process all the diff file instead
  of processing line by line.
* Multiline comments are highlighted correctly.
2015-12-30 00:52:50 -05:00
Douwe Maan e9e9f537e8 Truncate submodule commit SHAs to 7 characters 2015-12-02 14:53:20 +01:00
Robert Speicher df6bb57921 Merge branch 'compare-first-commit' into 'master'
Correctly set comparison first commit when range includes a merge commit

Fixes #3207.

See merge request !1814
2015-11-17 18:51:40 +00:00
Dmitriy Zaporozhets 5098ad9d3c Merge branch 'remove-code-duplication'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-17 19:17:15 +01:00
Douwe Maan e49190cad9 Don't use params[:view] directly. 2015-11-17 16:33:38 +01:00
Douwe Maan 24cf6865d3 Correctly set comparison first commit when range includes a merge commit 2015-11-17 13:10:01 +01:00
Dmitriy Zaporozhets 437d4c76ec Remove duplication in diff_helper.rb
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-17 10:49:23 +01:00
Dmitriy Zaporozhets c5ec2a23a4 Small UI improvements to merge request page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-06 16:27:18 +01:00
Douwe Maan 8710739e4e Correctly find last known blob for file deleted in MR. 2015-10-20 14:24:02 +02:00
Dmitriy Zaporozhets 4c43d846f2 Fix 500 error on compare page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-01 14:12:43 +02:00
Dmitriy Zaporozhets fe7e97320c Fix bug when removed file was not appearing in merge request diff
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-30 12:31:23 +02:00
Dmitriy Zaporozhets c2a9e6ea67 Fix tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-03 22:15:21 +02:00
Alex ConnorandJeroen van Baarsen 3c892f3554 Disabled expansion of top/bottom blobs for new file diffs 2015-05-21 09:25:07 +02:00
Alex Lossent affd049dc4 Improve handling of large diffs
Diffs with a large number of changed lines time out (504 HTTP error) or
generate a HTML page that's so heavy web browsers struggle with it.

https://github.com/gitlabhq/gitlabhq/pull/5014 introduced limits on
commit line count so that only a safe portion is rendered. This was
later undone by code refactoring in be5b6db8, e0eb4803 and c741fcab.
This patch re-introduces a safe limit on number of lines.
2015-05-05 18:51:12 +02:00
Stan Hu 72a7febead Fix "Revspec not found" errors when viewing diffs in a forked project with submodules
Closes #1413
2015-04-27 20:42:38 -07:00
Dominik Sander d4fec49abc Fix merge request comments on files with multiple commits
Having a merge request with a comments on a line which is then changed
in a later commit prevented new comments from properly showing up in the
merge request show page.

 * `Note#set_diff` do not use stored the diff when creating a new note
   in merge requests (we can not be sure the diff did not changed since
   the last comment on that line)
 * Do not rely just on `outdated?` of the first note when displaying
   comments of a MR in the discussion tab, but partition the
   active/outdated notes and display them all
 * In the inline changes tab just select the active notes, so an
   outdated note does not prevent an active one from being rendered
 * Just show active comments in the side-by-side changes tab
2015-04-15 18:23:57 +02:00
Stan Hu 546dab6da9 Fix broken side-by-side diff view on merge request page
Closes #1294
2015-03-25 23:39:34 -07:00
Dmitriy Zaporozhets 30ca451fd4 Refactor buttons 2015-03-14 00:29:32 -07:00
Headless 3d2aaa169e show diff in submodules 2015-01-19 17:18:08 +03:00
Dmitriy Zaporozhets 5140a4cd13 Set of UI changes mostly for issue and merge request
* return edit/close buttons to old position (right of title)
* make 'Issue #1' header smaller
* move mr commits to separate tab
* change inline/side diff switcher to buttons from tabs
* make issue sidebar start with dicsussion block

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-12-25 14:32:49 +02:00