gitlab-org--gitlab-foss/app
Fatih Acet 3981f9f968 Merge branch '21633-permalink-to-collapsed-diff-line-does-not-work' into 'master'
Fixed anchoring diff lines in collapsed diffs

## What does this MR do?

This MR adds the ability to `forceLoad` a collapsed diff from instantiation, on top of this, if it is force loaded, we can pass a callback function to be invoked when the content is loaded.

Now when a MR is loaded, we check for a diff line anchor that is currently within a collapsed diff, we re-instantiate the `singleFileDiff` with the `forceLoad` option. We also pass a callback function that in responsible for highlighting and scrolling to the specified anchor.

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

## Why was this MR needed?

We currently cannot anchor link to collapsed diff lines as the do not auto-expand.

## Screenshots (if relevant)

https://youtu.be/fZVLlP6kchw

## Does this MR meet the acceptance criteria?

- [ ] [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
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

Closes #21633

See merge request !6285
2016-11-01 20:31:04 +00:00
..
assets Merge branch '21633-permalink-to-collapsed-diff-line-does-not-work' into 'master' 2016-11-01 20:31:04 +00:00
controllers Merge branch 'Allow-admin-to-search-for-user-by-secondary-email-address' into 'master' 2016-11-01 16:14:22 +00:00
finders Skip authorization check when searching for labels on IssuableFinder 2016-10-31 23:27:49 -02:00
helpers Correctly passes feature key into feature_available method 2016-11-01 08:45:46 +00:00
mailers Just show the first merge request we found, feedback: 2016-10-14 19:54:51 +08:00
models Merge branch 'Allow-admin-to-search-for-user-by-secondary-email-address' into 'master' 2016-11-01 16:14:22 +00:00
policies Use delegate! on group and project labels policies 2016-10-19 14:58:26 -02:00
services Merge branch '22448-fix-500-nonexisting-branch' into 'master' 2016-11-01 16:52:25 +00:00
uploaders
validators
views Merge branch '22889-remove-links-from-sidebar' into 'master' 2016-11-01 19:29:24 +00:00
workers Merge branch 'master' into 'add-retry-limit-project-webhook' 2016-10-31 15:00:30 +00:00