Commit Graph

33 Commits

Author SHA1 Message Date
Phil Hughes 12edecd002
Add headers to files in the tree list on merge requests
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54807
2019-01-08 09:31:23 +00:00
Sam Bigelow 9c18798275 Utilize :key to minimize extra rerenders
The diff notes automatically focus on mount, and when using the index
(as opposed to line_code) for the v-bind:key, the comment form gets
unnecessarily remounted, and therefore refocused.
2018-12-17 20:25:41 -05:00
Mike Greiling 7c4e996c74 Merge branch 'winh-merge-request-diff-discussion-commit-id' into 'master'
Pass commit when posting diff discussions

See merge request gitlab-org/gitlab-ce!23371
2018-12-07 09:06:14 +00:00
Phil Hughes 2ed65be1c3
Fixed renamed and mode changed diff viewers
Renders mode changed and renamed file merge request diff
viewers on the frontend.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52607
2018-12-06 14:39:29 +00:00
Winnie Hellmann e7439c3104 Pass commit when posting diff discussions 2018-12-05 22:36:51 +01: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
Phil Hughes 234563ba30
Made diff & note data consistent
This caused many pain points when working with it.
Part of the data was camel cased the other snake case.
Other parts where snake case & then getting converted in components,
this conversion has the potential for leaking memory.

This changes that & makes it consistent with what it returned from the
API, snake case.
2018-11-14 19:16:46 +00:00
Phil Hughes 35faecb06b
Restored width & height properties 2018-11-06 10:17:59 +00: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 8e5c0e68ec Backport CE changes for: [Frontend only] Batch comments on merge requests 2018-10-06 17:16:40 +00:00
Phil Hughes 14ed916cf2 Merge branch '51958-fix-mr-discussion-loading' into 'master'
Fix MR discussion not loaded issue

Closes #51958

See merge request gitlab-org/gitlab-ce!21982
2018-10-04 07:37:24 +00: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
Mark Chao f09303b00a Fix MR discussion not loaded issue
Display `formatter` as the sole content of `position` object.
This means `diff_file` data is not referenced, which is the
caseu of "IOError: not opened for reading".
2018-10-01 22:37:43 +08:00
Phil Hughes 78f64e83ab Changed `true` string to a boolean
Fixed toBeTruthy to toBe(true) in spec
2018-09-21 11:59:44 +01:00
Douwe Maan 2036458e15 Return discussion object from NotesController#create when return_discussion param is set 2018-09-21 11:40:57 +01:00
Phil Hughes 90673dbcb8
Changed isDiscussionApplicableToLine to accept an object 2018-09-18 16:27:53 +01:00
Phil Hughes 5c39c7c3b9
Updated latestDiff logic to only be used to LegacyDiffNotes 2018-09-17 10:11:44 +01:00
Phil Hughes 5eef5f242a
Updated LegacyDiffNote logic 2018-09-17 09:50:38 +01:00
Phil Hughes 8064ab84a6
Re-enable legacy diff notes on merge request diffs
This re-enables legacy diff notes on the merge request diffs
This feature was not workig correctly after the Vue refactor
LegacyDiffNotes have no `position`, instead they only have a `line_code`
As an extra, this also re-enables commenting on legacy diffs.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/48873
2018-09-17 09:50:36 +01:00
Tim Zallmann 12b48e61af Resolve "On master, inline diff view contains extra `+` and `-` signs" 2018-09-10 08:50:41 +00:00
André Luís 04c0d12d1a Resolve "Merge requests show outdated discussions on changes tab" 2018-09-08 06:37:41 +00:00
Tim Zallmann af688bd6e8 Cosmetic changes to let setup 2018-09-07 17:57:07 +02:00
Tim Zallmann d4d5ed59f9 Fixes based on MR discussion around naming, mutations, handling of state 2018-09-07 16:20:57 +02:00
Tim Zallmann b8ecb2c7eb Added new tests for newly added mutations, actions, utils 2018-09-07 12:25:50 +02:00
Tim Zallmann c9bacfd682 Fixed Resolving, Loading more and Line Bugs 2018-09-07 12:25:50 +02:00
Tim Zallmann 8563499b0f Fix for Getter + Linting 2018-09-07 12:25:50 +02:00
Tim Zallmann 4164c616e7 Loading Discussions later on Diffs 2018-09-07 12:25:50 +02:00
Tim Zallmann 23abdf3edb Only rendering diff for now 2018-09-07 12:25:50 +02:00
Tim Zallmann 8daf9db68f Porting MR Vue Memory Fixes to current master 2018-08-08 02:50:01 +00:00
André Luís 09c1b008eb Revert "Merge branch '_acet-fix-outdated-discussions' into 'master'"
This reverts commit 740ae2d194, reversing
changes made to 1ba47de5fe.
2018-08-01 13:45:16 +01:00
Fatih Acet 7632330e50
Fix showing outdated discussions on Changes tab 2018-07-18 00:07:37 +02:00
Filipa Lacerda 49828db524 Improves performance on MR refactor and adds specs 2018-07-05 12:05:57 +00:00
Felipe Artur 3e66795ef1 Changes tab VUE refactoring 2018-06-21 12:22:40 +00:00