Commit Graph

43 Commits

Author SHA1 Message Date
GitLab Bot 93c6764dac Add latest changes from gitlab-org/gitlab@master 2019-12-09 12:07:58 +00:00
GitLab Bot b41cd8cb92 Add latest changes from gitlab-org/gitlab@master 2019-12-04 18:08:46 +00:00
GitLab Bot 23d237110e Add latest changes from gitlab-org/gitlab@master 2019-11-26 09:08:36 +00:00
Thomas Randolph c0769b308a Make all of the discussion toggle clickable 2019-08-16 15:40:29 -06:00
Phil Hughes d2fd6bd510
Added diff suggestion popover
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56523
2019-06-14 14:01:24 +01:00
Phil Hughes 40eb7f72b9
Fixes issues with show whitespace button in diffs
Correctly updates the URL without overwriting parameters
Reloads the diff file content without reloading the page

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58852, https://gitlab.com/gitlab-org/gitlab-ce/issues/42597
2019-05-10 19:06:37 +01:00
Phil Hughes 45ef6fd777
Fixed fluid layout preference not being respected in diffs
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52916
2019-04-12 09:32:05 +01:00
Sam Bigelow bf47270e90 Improve diff navigation header
- Compare versions header is full width except in the unified diff mode
with no tree sidebar
  - Bar is always full width, but the content within stays centered when
unified and no tree sidebar
- File header is the same height as the "Compare versions header"
- aligns with the design system grid guidelines => 56px
- Diff file headers use a button group, switch icon order to open file
externally being the last option, all buttons will become icon buttons
(icon delivery by @dimitrieh)
- If a file header becomes sticky no rounded corner/double border
problem is visible anymore
2019-04-05 14:57:01 -04:00
Phil Hughes 27fa7b9ca8
Collapse diff tree is only one file is present
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53139
2019-03-19 11:34:21 +00:00
Denys Mishunov 0aff8e2753 Set up basic keyboard next/previous navigation in diff list
Mousetrap is used as the help-tool to listen to keystrokes

Added currentDiffIndex getter to store that holds
the index of currently active diff file in the list

Instead of computing it on the component, we will take advantage of it
being available for all components in DiffsApp

Testing keyboard navigation and jumpToFile()
2019-02-27 09:12:13 +00:00
Phil Hughes d17de657fe
Make the file tree in merge requests resizable
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51857
2019-02-15 10:33:33 +00:00
Phil Hughes 6e5461d67f
Added fuzzy file finder to merge requests
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53304
2019-02-05 11:29:49 +00:00
Oswaldo Ferreira ed3034bbb7 Allow suggesting single line changes in diffs 2018-12-13 19:17:19 +00:00
Phil Hughes ee2f3cac35
Fix diff changes empty state
The empty state now only gets shown when no files exist in the branch.
If the user is reviewing 2 versions with no files, we don't show the state.

Refactors the diff app spec to use Vue test utils.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/48635
2018-12-13 10:57:45 +00:00
Sam Bigelow 44a0121ad4 Resolve "Merge request refactor does not highlight selected line" 2018-11-30 08:48:47 +00:00
Phil Hughes 93c614ce92
Show toggle tree button on merge request commits
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53019
2018-11-22 12:04:18 +00:00
Mike Greiling 5b9495c5db
Prettify all the things 2018-11-20 09:30:01 -06:00
Clement Ho 8b1f2823a2 Use @gitlab npm namespace 2018-11-16 19:29:11 +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 cfedc31b7a
Improve initial rendering of discussion notes
This improves the initial rendering performance of notes
by only creating a new TaskList for the whole app,
rather than on a per-note component basis.
2018-11-09 09:55:37 +00:00
Clement Ho c4aa33fc8b Remove gitlab-ui loading icon from global 2018-11-07 10:06:15 +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
Phil Hughes 605e7fddc8
Fixes diff discussions not being fully removed
This fixes a bug where a discussion on a none changed line
would not get fully removed and therefore leave the comment row
empty. This was caused by the discussiob being added
to the right when it shouldnt of been

This also fixes a very rare edge case where discussions would get added
twice to diff lines causing a Vue rendering warning

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53317
2018-10-30 10:41:25 +00:00
Phil Hughes 0fba7cca36
Update the state, not a param
Also fixed a bug where discussions wouldn't be assigned to a line
when switching from discussion tab to changes tab
2018-10-25 12:04:34 +01:00
Phil Hughes 80a689fab8
Impove diff discussion data
Pre-request to https://gitlab.com/gitlab-org/gitlab-ce/issues/48956
2018-10-24 13:30:30 +01: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 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 f390184249 Resolve "Commit details are not displayed when reviewing an MR commit by commit" 2018-09-26 08:28:50 +00:00
Clement Ho f815b48f39 Use gitlab-ui loading icon 2018-09-11 22:19:21 +00: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 d7a5d5b694 Removed the testing console.log's 2018-09-07 12:25:50 +02:00
Tim Zallmann 6f46b274e6 Updated discussion loading to be deferred and in the state 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 259e54402a ESLint Fixes 2018-08-08 10:46:17 +02:00
Tim Zallmann e70d06dff8 Incremental Rendering of the MR 2018-08-08 10:46:17 +02:00
Tim Zallmann 422dcfde03 Resolve "MR: Reduce the memory footprint of the component tree" 2018-07-17 15:47:02 +00:00
Filipa Lacerda 289530a084 Resolve "Improve performance of MR Changes tab: reduce event listeners on scroll event" 2018-07-12 12:42:56 +00: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
Tim Zallmann fb44cb3d90 Performance Improvements to Vue MR page 2018-06-30 13:17:46 +00:00
Fatih Acet d690cd9992 Prevent fetching diffs and discussions data unnecessarily on MR page 2018-06-29 07:22:07 +00: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