Commit Graph

62 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
Sam Bigelow eba4422803 Add kbd shortcuts for discussion navigation
Add keyboard shortcuts `p` and `n` to navigate duscussions.
2019-08-12 06:41:04 +00:00
Samantha Ming fc0ff7cf03 Replace ... with new expansion options
- expand upwards
- expand downwards
- expand all

in both inline and parallel views
2019-08-10 02:36:32 +00:00
Natalia Tepluhina d4151b14c2 Rebased and squashed commits
- all commits squashed to make danger review happy
2019-07-03 08:26:57 +00:00
Winnie Hellmann c2429ed553 Fix typo in updateResolvableDiscussionsCounts action 2019-07-02 23:11:13 +00: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
Ondřej Budai 7aac4e5c3f Fix whitespace changes visibility when the related file was initially collapsed 2019-06-05 07:27:08 +00: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 9d24d4a8fd
Impove the performance of expanding full diff
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58597
2019-05-03 08:33:15 +01: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
Phil Hughes c36095b2e3
Fix expand all button not working
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51737
2019-03-11 13:09:36 +00:00
Phil Hughes b14de8e1f5 Add option to expand diff to full file
The user can also toggle between the diff changes and
the full file diff.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/19054
2019-03-06 15:51:44 +08: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
Filipa Lacerda fe10964a68 Merge branch 'fix-diffs-not-rendering' into 'master'
Fix diff files not rendering

See merge request gitlab-org/gitlab-ce!25358
2019-02-18 16:19:19 +00:00
Phil Hughes 512f9624fa
Fix diff files not rendering
Fixes some diff files not rendering when the renderIt
property is updated.
Previously it was using a local copy of renderIt which meant
Vue wouldn't update it when the files renderIt property was updates
2019-02-18 15:16:04 +00:00
Filipa Lacerda fea813ab93 Merge branch 'diff-tree-resizable' into 'master'
Make the file tree in merge requests resizable

Closes #51857

See merge request gitlab-org/gitlab-ce!25097
2019-02-18 12:53:03 +00:00
Natalia Tepluhina bf8f32da7f Replaced part of diff file properties with diff viewer
- replaced file.too_large
- replaced file.text
- replaced file.collapsed
2019-02-15 17:56:50 +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
Phil Hughes 2f40aa68d9
Added dropdown for diff settings
Dropdown includes buttons for tree view rendering mode
and buttons for the compare view (inline or side-by-side)

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55491
2019-01-24 14:48:03 +00:00
Phil Hughes 9ff20ad76d
Collapses directory structure in merge request tree
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53069
2019-01-15 13:39:24 +00:00
André Luís 85daddbec9 Resolve "Navigating unresolved discussions on Merge Request page" 2018-12-08 07:19:03 +00:00
Winnie Hellmann e7439c3104 Pass commit when posting diff discussions 2018-12-05 22:36:51 +01:00
Phil Hughes d3a8fb6e79
Fixed expanding diff commit files
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/50662
2018-12-05 14:12:51 +00:00
Phil Hughes 9afc3069b0
Fixed diff files not expanding
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54868
2018-12-04 17:51:57 +00:00
Sam Bigelow 44a0121ad4 Resolve "Merge request refactor does not highlight selected line" 2018-11-30 08:48:47 +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
Mike Greiling 5b9495c5db
Prettify all the things 2018-11-20 09:30:01 -06:00
George Tsiolis 4a2b19706c Rename diffs store variable 2018-11-15 18:16:27 +02: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 a3fbde3512
Init task list when creating new note & discussion 2018-11-09 11:09:56 +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 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
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
Phil Hughes 2497c29ef0 Use returned discussion from API
We now use the returned discussion instead of re-fetching
all of the discussions and filtering out the ones we don't need.
This speeds up the process of creating a diff discussions
by saving us another API request before we can render the discussion
2018-09-21 11:59:41 +01:00
André Luís 38beacc926 Resolve "Link to file in Changes tab of MR no longer works for all files after incremental rendering improvement" 2018-09-20 08:21:17 +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 d2cbe07398 Adapted so utils + actions don't include any mutations and mutations are always against state 2018-09-07 17:13:11 +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 982da16bf2 Made the discussion tests artificial to have them stable, mocked RAF + RIC 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 cee271ee34 Fix for displaying left side comments when no discussion available 2018-09-07 12:25:50 +02:00
Tim Zallmann f8214f9568 Fixed Left side comments 2018-09-07 12:25:50 +02:00
Tim Zallmann 173ecfc42b Delete Discussions fix 2018-09-07 12:25:50 +02:00
Tim Zallmann b8b2cb3675 Fixed Problems with Inline View + Specs 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 53def4e2ee Adding new threads to MR page 2018-09-07 12:25:50 +02:00