Commit Graph
34 Commits
Author SHA1 Message Date
Jacob Schatz 5d16d50ceb Merge branch 'toggle-whitespace-button-for-compare-page' into 'master'
Toggle whitespace button for compare page

## What does this MR do?

Adds whitespace button to compare branches page.

## Are there points in the code the reviewer needs to double check?

Ruby code.

## Why was this MR needed?

Compare branches UX

## What are the relevant issue numbers?

Closes #17881.

## Screenshots (if relevant)

![Screen_Shot_2016-06-09_at_18.39.48](/uploads/8995a7bc8bea7fa3ff19446ebe49fb88/Screen_Shot_2016-06-09_at_18.39.48.png)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- [ ] Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !4569
2016-06-15 22:48:39 +00:00
Stan Hu 0fdfd2dd6e Fix Error 500 when viewing a blob with binary characters after the 1024-byte mark
Here was the problem:

1. When determining whether a given blob is viewable text, gitlab_git reads the first 1024 bytes and checks with Linguist whether it is a text or binary file.
2. If the blob is text, GitLab will attempt to display it.
3. However, if the text has binary characters after the first 1024 bytes, then GitLab will attempt to load the entire contents, but the encoding will be ASCII-8BIT since there are binary characters.
4. The Error 500 results when GitLab attempts to display a mix UTF-8 and ASCII-8BIT.

To fix this, we load as much data as we are willing to display so that the detection will work properly. Requires
an update to gitlab_git: gitlab-org/gitlab_git!86

Closes #13826
2016-06-12 07:36:25 -07:00
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
Alfredo Sumaran 4d6c40df9a Hide button on mobile 2016-04-26 14:01:40 -05:00
Alfredo Sumaran 4735914031 Update syntax 2016-04-26 14:01:40 -05:00
Alfredo Sumaran f0bdf5c692 Hide whitespace toggle button for new merge requests 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
Annabel Dunstone d76878b960 Diff touch ups 2016-04-07 15:33:18 -07:00
Stan Hu 79ad6e0e38 Fix bug where wrong commit ID was being used in a merge request diff to show old image
Closes #3769

Closes #14327
2016-03-19 13:28:40 -07:00
Jacob Vosmaer 1764e1b7cb Use Gitlab::Git::DiffCollections 2016-03-03 18:38:44 +01:00
Rubén Dávila c8db25c37c Merge branch 'master' into issue_3945 2016-01-14 17:28:44 -05: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
Dmitriy Zaporozhets bb5213588b Update files/diffs to match new layout
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-14 12:31:31 +01: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
Douwe Maan 3ad1d320ef Remove duplicated styling for center top menus 2015-12-02 14:49:12 +01:00
Douwe Maan e49190cad9 Don't use params[:view] directly. 2015-11-17 16:33:38 +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 e2576d588f Avoid unnecessary usage of local vars
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-01 15:51:28 +02:00
Dmitriy Zaporozhets 0d967bce57 Show additions/deletions stats on merge request diff
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-01 13:52:08 +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 86556a079e Improve diff UI and mr compare page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-08 17:22:26 +02:00
Dmitriy Zaporozhets 0276e9032a Limit content width for big screens except certain pages
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-26 11:51:28 +02:00
Dmitriy Zaporozhets 9860ab0f22 Remove sticky-diff functionality
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-06 11:34:37 +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
Dmitriy Zaporozhets c543cd1ed3 Fix performance issue when browse big diffs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-04-13 15:51:28 +03:00
Dmitriy Zaporozhets f2ea9d9f3f Improve sticky headers in diffs
* disable sticky headers in discussion
* enable sticky header on mr page with you click changes tab
2015-03-24 19:00:00 -07:00
Dmitriy Zaporozhets e07d32eb41 Add some space aroung diff stats block 2015-03-18 19:21:24 -07: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
Ciro Santilli 84bbf07d96 Typo localy -> locally. 2014-09-10 22:20:40 +02:00
Marin Jankovski 2ff83aa389 Fix typo. 2014-09-09 11:52:16 +02:00
Dmitriy Zaporozhets 02e87d9223 optimize show_diff_size_warning?
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-08 22:12:54 +03:00
Dmitriy Zaporozhets 218219abbd Refactoring inside refactoring. We need to go deeper
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-08 21:54:52 +03:00
Dmitriy Zaporozhets e0eb48031d Refactor diff views
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-08 16:26:49 +03:00