Commit Graph

120 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
Tim Zallmann 30038a40b0 Fixed Data Attribute Test 2019-01-06 15:57:15 +01:00
Tim Zallmann 7b325fa60c Added Spec for Vue Commit Item 2019-01-06 08:59:39 +01:00
Phil Hughes 70ba4ba285 Merge branch '51606-expanding-a-diff-while-having-an-open-comment-form-will-always-scroll-down-to-the-comment' into 'master'
Resolve "Expanding a diff while having an open comment form will always scroll down to the comment"

Closes #51606

See merge request gitlab-org/gitlab-ce!23849
2018-12-20 09:32:56 +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
Fatih Acet 2f4fe2b503 Merge branch 'inline-duplicated-discussions' into 'master'
Fixed duplicated inline diff discussions

Closes #55388

See merge request gitlab-org/gitlab-ce!23843
2018-12-17 12:51:50 +00:00
Nick Thomas 8d2e1b724b Merge branch '54786-mr-empty-file-display' into 'master'
Display empty files properly on MR diffs

Closes #54786

See merge request gitlab-org/gitlab-ce!23671
2018-12-15 12:21:54 +00:00
Phil Hughes e64c9c2112
Fixed duplicated inline diff discussions
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55388
2018-12-14 21:32:41 +00:00
Sean Nichols 9f9eb03f3d Fix diff table rendering for empty files and improve tests 2018-12-13 23:52:31 -05: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
Sean Nichols 4d2448e03a Add tests and move empty file message into own component 2018-12-13 01:49:32 -05:00
Phil Hughes efbb950131
Added test 2018-12-12 19:45:23 +00:00
Phil Hughes 210e90dfce
Fixed notes not being applied to diff lines
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55248, https://gitlab.com/gitlab-org/gitlab-ce/issues/55245
2018-12-12 19:29:48 +00:00
André Luís 85daddbec9 Resolve "Navigating unresolved discussions on Merge Request page" 2018-12-08 07:19:03 +00: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
Oswaldo Ferreira 26b94bcc7d Remove unused data from discussions endpoint
We don't need a series of attributes to render diff files on
discussions.json request. Therefore this MR removes lots of unnecessary
attributes from the request, mainly the highlighted diff lines, which
are pretty expensive.
2018-12-06 17:07:49 -08: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
Filipa Lacerda cfe484795d Merge branch 'diff-expand-commit-file' into 'master'
Fixed expanding diff commit files

Closes #50662

See merge request gitlab-org/gitlab-ce!23591
2018-12-05 18:04:35 +00: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 6dfede5a6d
Fixed multiple discussions getting added to diff lines
Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/8195
2018-12-05 11:42:41 +00:00
Filipa Lacerda 2cd710732e Merge branch 'expand-diff-bug' into 'master'
Fixed diff files not expanding

Closes #54868

See merge request gitlab-org/gitlab-ce!23555
2018-12-05 09:11:31 +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
Phil Hughes 7aa8803083 Updated variable name to forceExpanded 2018-12-04 13:27:18 +00:00
Phil Hughes b8ee8c2787
Fixed multiple diff line discussions not expanding
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53600
2018-12-04 10:58:02 +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
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
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 8e265bc359
Fix collapsed files not fully fully expanding
This fixes files that are collapsed by default not expanding
when the expand all button is clicked.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53866
2018-11-13 13:42:04 +00:00
Douwe Maan 56834e6bb2 Merge branch 'osw-comment-on-any-line-on-diffs-w-feature-flag' into 'master'
Comment on any expanded diff line on MRs (with feature-flag)

Closes #13950

See merge request gitlab-org/gitlab-ce!22914
2018-11-12 15:36:48 +00:00
Phil Hughes eaca2033d5
Changed diff tree filtering to path
Previously it was using name which could make it hard
to filter for the file you want in a certain folder.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53781
2018-11-12 14:42:22 +00:00
Oswaldo Ferreira f9b4130bb7 Comment on any expanded diff line on MRs 2018-11-09 16:56:48 -02:00
Oswaldo Ferreira 198402b38b Revert "Merge branch 'osw-comment-on-any-line-on-diffs' into 'master'"
This reverts commit a82a595728, reversing
changes made to e7df959b8f.
2018-11-07 19:57:26 -02:00
Phil Hughes e354a64e89
Show expand all button on merge request diffs
This restores the behaviour of showing the expand all button on diffs
even when only a single file is collapsed.
Previously the button would only show when all files are collapsed.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51737
2018-11-07 13:03:13 +00:00
Douwe Maan a82a595728 Merge branch 'osw-comment-on-any-line-on-diffs' into 'master'
Comment on any expanded diff line on MRs

See merge request gitlab-org/gitlab-ce!22398
2018-11-07 11:56:46 +00:00
Oswaldo Ferreira ec66ef1b74 Comment on any expanded diff line on MRs 2018-11-06 17:39:31 -02: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
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
Jacques Erasmus 4508343d16 Fix broken "Show whitespace changes" button on MR "Changes" tab 2018-10-29 16:16:40 +00:00
Phil Hughes 81944ec925
Fixed action & mutation specs 2018-10-25 12:57:08 +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 9fd5a78d8b
Fixed failing specs
Added tests to file row truncated text computed prop
2018-10-23 09:12:37 +01:00
Phil Hughes 2d00e7fce5
Add list mode to file browser in diffs
This adds toggle buttons to switch between file & tree list.
For file list, it renders the truncated paths with the ellipsis
at the start of the path.

When focusing the input, it hides the toggle buttons.
On blur, the buttons get shown again.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51859
2018-10-23 09:12:36 +01:00
Mike Greiling f666026d71
Prettify all spec files 2018-10-17 11:18:17 -05:00
Johann Hubert Sonntagbauer 6f5723a169 enable jasmine/new-line-before-expect 2018-10-17 06:57:29 +02:00
Jacques Erasmus a577cfcbb2 Fix broken file name navigation on MRs 2018-10-11 22:32:28 +00:00