Commit Graph

21 Commits

Author SHA1 Message Date
Douwe Maan 7e09a9b7dc Clean up diff rendering 2017-05-23 15:37:05 -05:00
Mike Greiling e4e95adf48 remove bind polyfill from single_file_diff.js 2017-05-08 17:40:20 -05:00
Mike Greiling 0f31c5a92b replace implicit this == window with explicit binding 2017-02-17 16:58:32 -06:00
Filipa Lacerda b57027f2a5 Use a new class to keep old behavior 2017-02-08 20:52:08 -06:00
Mike Greiling 04eff5fdb0 resolve all x-spacing and no-spaced-x eslint violations 2017-01-18 17:18:40 -06:00
Mike Greiling ccada28f30 resolve all padded-blocks eslint violations 2017-01-18 17:16:41 -06:00
Luke "Jared" Bennett c1dd08e17b
fixed commit diff linking and added specs 2017-01-14 14:25:37 +00:00
Mike Greiling 8e0e902b13 resolve all instances of no-undef eslint rule violations 2016-12-14 02:11:13 -06:00
Luke Bennett c434568f37 re-apply MR !6285 "Added forceLoad ability to singleFileDiffs, added callback to getContentHTML, added conditional force load if a collapsed diff line anchor is found"
Use url utility to retrieve hash
2016-12-02 17:38:58 -06:00
Mike Greiling 2de245c7ba temporarily revert "Added forceLoad ability to singleFileDiffs, added callback to getContentHTML, added conditional force load if a collapsed diff line anchor is found"
This reverts commit d2ee380816.
2016-12-02 17:32:37 -06:00
Luke "Jared" Bennett 7cefaea876
explicitly disable eslint inline 2016-11-15 16:30:34 +00:00
Phil Hughes c8133c53b2 Changed how resolving notes is rendered
Vue2 was taking the template out & then appending again. This changes that
2016-11-10 17:53:34 +03:00
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
winniehell 02f94cf038 disable ESLint for all JavaScript files 2016-10-26 10:02:58 +02:00
Luke Bennett d2ee380816
Added forceLoad ability to singleFileDiffs, added callback to getContentHTML, added conditional force load if a collapsed diff line anchor is found
Use url utility to retrieve hash
2016-10-21 22:28:16 +01:00
Luke Bennett ffdccaa0a8
Updated diff toggle targets and added icon 2016-09-03 20:24:31 +01:00
Phil Hughes a3a672095d Fixed issue with expand diff not initializing resolve buttons 2016-08-04 11:27:11 +01:00
Phil Hughes 8bdd88a41b Checks if DiffNotesApp is defined 2016-08-01 13:03:16 +01:00
Phil Hughes d6e724d90f Moved method to compile components from window into diffnotesapp 2016-08-01 10:21:57 +01:00
Phil Hughes c51cbc1f2f Updated issues with jump tp button
Fixed styling bugs
2016-08-01 10:06:31 +01:00
Fatih Acet aaa9509d12 ES6ify all the things! 2016-07-24 23:45:11 +03:00