Commit Graph

14 Commits

Author SHA1 Message Date
Sam Bigelow 44a0121ad4 Resolve "Merge request refactor does not highlight selected line" 2018-11-30 08:48:47 +00:00
Filipa Lacerda 822fa649eb Merge branch 'discussion-perf-fixes' into 'master'
Improve discussion rendering performance

Closes #51506

See merge request gitlab-org/gitlab-ce!22935
2018-11-28 09:45:36 +00:00
Phil Hughes adf8ad9eee
Improve discussion rendering performance
Improve the renderign of new and existing discussions
by reducing the number of watchers on each object & array.
Previously every discussion change would trigger an update for every
discussion component.

Also tidied up some components to get them closer to our docs.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51506
2018-11-27 11:40:39 +00:00
Winnie Hellmann 0bf740fa32 Replace `=== true` with `parseBoolean()` 2018-11-27 09:18:48 +01:00
Phil Hughes f7df9ddb52
Re-implemented image commenting on diffs
This re-implements image commenting in merge request diffs.
This feature was previously lost when the merge request
page was refactored into Vue.

With this, we create an overlay component. The overlay
component handles displaying the comment badges
and the comment form badge.
Badges are displayed based on the position attribute
sent with the discussion.

Comment forms for diff files are controlled through
a different state property. This is so we don't
tie comment forms to diff files directly creating
deep nested state. Instead we create a flat array
which holds the file hash & the X & Y position of
the comment form.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/48956
2018-11-05 14:02:41 +00:00
André Luís 52cf955b89 Improve MR file tree on small screens 2018-10-11 23:33:38 +01:00
Phil Hughes 33c4c5b8f3
Added file tree to merge request diffs
This file tree displays all the diff files in a tree like format
Each file is taken and converted into a tree with folders
Each folder can be toggled open & closed
Clicking a file will scroll to the diff file & highlight with a glow affect

Searching the tree list will search only files & return a list of the
files without any folders

Each file row contains an icon to show changed, new file or deleted
Each row will also contain the added & removed lines count

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14249
2018-10-03 10:05:43 +01:00
Paul Slaughter ae5600b868 Create specs for diffs/components/app and update modules to export factory functions 2018-09-14 08:25:13 +00:00
Phil Hughes ca1deb9e5e Merge branch '48951-clean-up' into 'master'
Resolve "MR refactor: All actions under diff module are being exported twice"

Closes #48951

See merge request gitlab-org/gitlab-ce!20499
2018-07-10 07:38:48 +00:00
Filipa Lacerda 8186bb3903
Removes unused store in diffs mr refactor
Removes double export for actions in diffs module in mr refactor
2018-07-09 15:46:36 +01:00
Filipa Lacerda 156a9d3913
Transforms diffs module to a namespaced one to avoid console error due to rewire export.
Detailed: Because of rewire we need to export a default empty object in our actions to prevent it to export the wrong default in karma. Vuex getters are global, and because the Vuex store uses several non namespaced moduled, there was already a getter named default, due to the same empty export.
In order to solve it I chose to namespace the module. Could also be fixed by importing the getters explicitly instead of all of them.
2018-07-06 17:26:18 +01:00
Filipa Lacerda adb7f45aff
Exports getters individually.
Exports state to allow tests
Adds specs for the getters that didn't have any.
2018-07-06 13:21:02 +01:00
Tim Zallmann 53f77cfee1 Added Diff Viewer to new VUE based MR page 2018-06-26 18:49:22 +00:00
Felipe Artur 3e66795ef1 Changes tab VUE refactoring 2018-06-21 12:22:40 +00:00