Commit Graph

143 Commits

Author SHA1 Message Date
GitLab Bot ec884edd46 Add latest changes from gitlab-org/gitlab@master 2020-06-01 06:08:21 +00:00
GitLab Bot 6305f1dc00 Add latest changes from gitlab-org/gitlab@master 2020-01-30 06:08:49 +00:00
GitLab Bot 969ce9efdb Add latest changes from gitlab-org/gitlab@master 2019-12-30 15:09:15 +00:00
GitLab Bot 47b8f79a08 Add latest changes from gitlab-org/gitlab@master 2019-12-13 00:08:05 +00:00
GitLab Bot b86f474bf5 Add latest changes from gitlab-org/gitlab@master 2019-12-11 12:08:10 +00:00
GitLab Bot ea4762d464 Add latest changes from gitlab-org/gitlab@master 2019-11-22 18:06:00 +00:00
GitLab Bot 6d31b8f052 Add latest changes from gitlab-org/gitlab@master 2019-11-12 18:06:57 +00:00
GitLab Bot 94611567bd Add latest changes from gitlab-org/gitlab@master 2019-09-30 09:06:31 +00:00
David Palubin 1897ec48d3 Remove unresolved class and fixed height in discussion header 2019-07-05 16:42:51 +00:00
Ezekiel Kigbo 0c028a816b Vue-i18n: app/assets/javascripts/notes directory
i18n linting for .vue files under the
app/assets/javascripts/notes directory
2019-07-04 10:20:38 +00:00
Sean McGivern b94daa35a4 Merge branch 'master' into michel.engelen/gitlab-ce-issue/55953 2019-07-03 10:28:13 +01:00
Natalia Tepluhina d4151b14c2 Rebased and squashed commits
- all commits squashed to make danger review happy
2019-07-03 08:26:57 +00:00
Michel Engelen 2ded70292e prettified noteable_discussion component and updated tests 2019-07-02 14:29:54 +02:00
Michel Engelen 638542467b replaced string `discussion` wit `thread` in noteable-discussion component 2019-07-02 14:29:54 +02:00
Samantha Ming 4bf0434359 Rearrange discussion resolve buttons & update button display
- next-discuss button is always show unless there is only 1 discussion
- regroup buttons arrangements
2019-06-28 07:32:03 +00:00
Marcel van Remmerden b574285210 Resolve "Avatar in "Please sign in" pattern too large" 2019-06-24 15:27:49 +00:00
Marcel van Remmerden 5bfc100607 Format vue files with prettier
Add changelog file
2019-06-06 15:51:04 +00:00
Paul Gascou-Vaillancourt 911701ae47 Extract discussion notes into new component
- Moved discussion notes out of `NoteableDiscussion` component into a
new `DiscussionNotes` component
- Wrote Jest tests for the new `DiscussionNotes` component
- Updated Jest config for emojis fixtures
- Updated Karma tests `NoteableDiscussion` to match its new structure
- Convert `DiffDiscussions` tests to use Vue test utils
2019-05-01 10:04:07 +00:00
Paul Slaughter a773082e60
Resolve EE / CE diff of noteable_discussion 2019-04-22 16:44:15 -05:00
Paul Gascou-Vaillancourt e555c8f480 Extract discussion actions into separate component
- Created DiscussionActions component
- Updated NoteableDiscussion component accordingly
- Wrote Jest tests for DiscussionActions
- Updated Jest config to enable emojis aliases mock
- Updated qa specs to reflect changes in NoteableDiscussions
2019-04-17 13:42:44 -04:00
Heinrich Lee Yu 7495140de2 Expand discussion when opening link to comment
Makes discussion expansion depend on `discussion.expanded`
2019-03-26 09:51:47 +08:00
Winnie Hellmann 25133a379e Remove autosave logic from NoteableDiscussion component 2019-03-21 17:14:44 +01:00
Winnie Hellmann 53e23a296d Pass autosaveKey from NoteableDiscussion to NoteForm 2019-03-21 17:14:44 +01:00
Winnie Hellmann e9d1393e8d Rename initialDiscussion to firstNote in NoteableDiscussion 2019-03-12 12:03:30 +01:00
Phil Hughes 573dd592b0
CE port of noteable-discussion-ee-differences 2019-02-28 10:55:13 +00:00
Winnie Hellmann a26cd1235a Extract ResolveWithIssueButton from NoteableDiscussion component 2019-02-25 16:38:29 +00:00
Winnie Hellmann 8441fc4799 Remove noteId prop from ReplyButton component
Move convertToDiscussion call from ReplyButton to NoteApp component
2019-02-18 09:43:13 +00:00
Constance Okoghenun 5e137b58ca Cancelling reply reverts comment to initial state
When converting a comment to a discussion
if the "Cancel" button is used to exit the new discussion note,
the comment would revert back to its initial state
2019-02-18 08:16:13 +01:00
Annabel Dunstone Gray a017fe6e3f Merge branch '55206-discussion-text-alignment' into 'master'
Correctly align resolved discussion text

Closes #55206

See merge request gitlab-org/gitlab-ce!25001
2019-02-15 12:36:11 +00:00
Heinrich Lee Yu f60734d3cb Fix polling for replies to individual notes
Sets `updated_at` so that the transformed note is returned together with
the new reply
2019-02-14 10:07:13 +00:00
Mark Florian 9848c1c97c Correctly align resolved discussion text
The header of the `NoteableDiscussion` component is really a media
object[1], but it didn't have the right DOM or styling to correctly
achieve it.

This change wraps all the children of the media object (except the
floated image) in a dedicated `.timeline-content` element, which is
styled to establish its own block formatting context[2]. This ensures
*all* of its children sit left-aligned to the right edge of the float.

In short, the DOM used to look like this:

    .discussion-header
        .timeline-icon
        note-header
        note-edited-text

and now it looks like this:

    .discussion-header
        .timeline-icon
        .timeline-content (with own formatting context)
            note-header
            note-edited-text

This is also now more consistent with the DOM of `NoteableNote`, in that
`.timeline-icon` and `.timeline-content` seem to want to be siblings.

[1]: http://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/
[2]: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
2019-02-12 19:32:27 +08:00
Heinrich Lee Yu a04d9ba90c Add reply to notes to turn into discussions 2019-02-06 10:31:46 +00:00
Winnie Hellmann 63975b4a68 Extract ReplyPlaceholder from NoteableDiscussion component 2019-02-05 08:56:34 +00:00
Martin Hobert 56c62208f6 refactor(NoteableDiscussion): Extracted ResolveDiscussionButton from 2019-01-28 22:44:17 +00:00
Phil Hughes 958a819fce Merge branch 'refactor/56369-extract-jump-to-next-discussion-button' into 'master'
Refactor/56369 extract jump to next discussion button

Closes #56369

See merge request gitlab-org/gitlab-ce!24506
2019-01-28 17:33:20 +00:00
Martin Hobert 3af7723fcd refactor(NoteableDiscussion): Extracted JumpToNextDiscussionButton to its own component
fix #56369

chore(changelog): Added changelog entry

chore(prettier): Formated with prettier

test(JumpToNextDiscussionButton): Added test for new component

test(Refactored tests to use vue test-utils):

chore(translations): Added newly generated locales

Update spec/javascripts/notes/components/discussion_jump_to_next_button_spec.js
chore(prettier): Formated with prettier

test(JumpToNextDiscussionButton): Updated tests to use a local vue instance

test(JumpToNextDiscussionButton): Running tests in async to prevent maximum stack overflow
2019-01-28 11:36:44 +01:00
Mike Greiling d6239b88b2 Merge branch '53950-commit-comments-displayed-on-a-merge-request' into 'master'
Resolve "Commit comments displayed on a merge request that contains that commit no longer specify which commit they come from"

Closes #53950

See merge request gitlab-org/gitlab-ce!24427
2019-01-24 21:54:04 +00:00
Douwe Maan 03df54b226
Trim first char of diff line text on diff discussions
Before, diff file `higlighted_diff_lines`/`parallel_diff_lines` and
diff discussion `truncated_diff_lines` were inconsistent: `text` and
`rich_text` on the latter included the leading +/-/<space> character,
like on the backend, while the former had no `text` and its `rich_text`
had dropped this char.

This resulted in a bug when the suggestions feature expected these diff
line objects to be identical in format and thus interchangeable, which
was not the case.
2019-01-22 17:00:16 +01:00
Constance Okoghenun c1c0c0c21b Display "commented" only for commit discussions on merge requests
Add commit prop to NoteableNote component and pass it from
NoteableDiscussion
2019-01-17 12:15:33 +01:00
Mike Greiling 7ccd235df1
Upgrade prettier and reformat files as necessary
Upgrades prettier to 1.15.3
Runs `yarn prettier-save-all` against the codebase
Most changes are due to https://github.com/prettier/prettier/pull/5519
2019-01-14 15:29:02 -06:00
Winnie Hellmann 0817c21067 Revert "Merge branch 'winh-discussion-header-commented' into 'master'"
This reverts merge request !23622
2018-12-21 17:00:26 +00:00
Kushal Pandya 80ff142c1c Merge branch 'winh-merge-request-commit-context' into 'master'
Display commit ID for discussions made on merge request commits

Closes #53953

See merge request gitlab-org/gitlab-ce!23837
2018-12-21 05:28:57 +00:00
Fatih Acet 5838598062
MR commits display commit ID for discussions
Fixes a bug where merge request comments made
in the context of a specific commit no longer specify
which commit they were created on
2018-12-21 00:19:44 +01:00
Winnie Hellmann 6aed2212bd Display "commented" only for commit discussions on merge requests
Add commit prop to NoteableNote component and pass it from
NoteableDiscussion
2018-12-19 23:54:54 +01:00
sbigelow 45203dc4b0 Add message saying who resolved nondiff discussion
- Add resolution text to notes in MR Discussions
- Use slots to do so
2018-12-17 09:45:27 -05:00
Winnie Hellmann a2e9ad83f4 Display reply field if resolved discussion has no replies 2018-12-14 11:49:53 +00:00
Oswaldo Ferreira ed3034bbb7 Allow suggesting single line changes in diffs 2018-12-13 19:17:19 +00:00
Fatih Acet 71209c91f0 Merge branch 'gt-remove-unnecessary-line-before-reply-holder' into 'master'
Remove boxes around code comments

Closes #54030 and #54058

See merge request gitlab-org/gitlab-ce!23092
2018-12-11 14:18:52 +00:00
Winnie Hellmann 1272b5fadc Make commit IDs in merge request discussion header monospace 2018-12-11 10:22:00 +00:00
Annabel Dunstone Gray 63e2c97b36 Remove boxes around code comments 2018-12-10 14:45:27 +02:00
André Luís 85daddbec9 Resolve "Navigating unresolved discussions on Merge Request page" 2018-12-08 07:19:03 +00:00
Winnie Hellmann 1cae0af4b8 Fix collapsing discussion replies 2018-12-04 10:09:51 +00:00
Winnie Hellmann e3bddb6223 Replace existing uses of timeline-entry with timeline entry component 2018-11-29 23:15:40 +01:00
Winnie Hellmann ac1badb4db Display commit ID for commit diff discussion on merge request 2018-11-29 14:31:34 +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
Fatih Acet e6cf3c7a6f
Allow commenting to resolved non-diff discussions 2018-11-22 15:45:28 +01:00
Mike Greiling 5b9495c5db
Prettify all the things 2018-11-20 09:30:01 -06: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
Annabel Dunstone Gray a597103ad5 Fix alignment of diff comment buttons 2018-11-09 09:37:00 -06:00
Fatih Acet cd5ddc4f2e Discussions redesign 2018-11-08 07:58:45 +00:00
Filipa Lacerda e1e315ee28 Merge branch 'mr-image-commenting' into 'master'
Re-implemented image commenting on diffs

Closes #48956

See merge request gitlab-org/gitlab-ce!22443
2018-11-07 10:04:54 +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
at.ramya 25b658cf65 QA Selectors for Batch Comment E2E Automation 2018-10-30 14:42:50 +05:30
Jacques Erasmus 9422679578 Resolve "Merge request buttons spacing incorrect" 2018-10-08 12:04:48 +00:00
Fatih Acet e3b96ad76b
Fix placeholder note rendering 2018-10-03 13:29:14 +02:00
Mike Greiling f829b181bc
Resolve eslint-plugin-vue errors
The eslint-plugin-vue upgrade had some breaking changes to
vue/attribute-order which needed to be resolved in order to avoid
disabling the rule entirely
2018-09-20 02:39:50 -05: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 173ecfc42b Delete Discussions fix 2018-09-07 12:25:50 +02:00
André Luís 296f489d85 Reapply "Merge branch '48817-fix-mr-changes-discussion-navigation' into 'master'"
This reverts commit e0fe97ca4a506405af8e85368f2c69cda637e192.
2018-08-01 15:26:57 +01:00
André Luís 8047b00fb6 Reapply "Merge branch '_acet-fix-mr-autosave' into 'master'"
This reverts commit bd5b177b0fc48d77b5069b112faf36d151221be7.
2018-08-01 15:26:57 +01:00
André Luís c7cd9ee97c Revert "Merge branch '_acet-fix-mr-autosave' into 'master'"
This reverts commit 5ba542b109, reversing
changes made to 32c831ea2b.
2018-08-01 13:45:15 +01:00
André Luís 8693aa139d Revert "Merge branch '48817-fix-mr-changes-discussion-navigation' into 'master'"
This reverts commit ced005f330, reversing
changes made to 9b01b293ce.
2018-08-01 13:45:15 +01:00
André Luís f2f8ddf4cc Resolve ""Jump to first/next unresolved discussion" jumps to resolved discussions" 2018-07-20 15:24:46 +00:00
Fatih Acet 3dd556f2d6
i18n changes for note cancel confirmations. 2018-07-18 12:55:57 +02:00
Fatih Acet e95be13d4d
Add disposeAutoSave method autosave mixin. 2018-07-18 12:55:57 +02:00
Fatih Acet 9cd5ca2f57
Fix autosave in noteable discussion. 2018-07-18 12:55:56 +02:00
Fatih Acet 5f7a81c441
Fix isDirty check of noteable discussion. 2018-07-18 12:55:56 +02:00
Felipe Artur 3e66795ef1 Changes tab VUE refactoring 2018-06-21 12:22:40 +00:00
gfyoung bce890820f Enable no-restricted-globals in JS files 2018-06-15 15:58:27 +00:00
Filipa Lacerda 647a4d6a3b
Updates eslint vue plugin version 2018-06-11 15:36:54 +01:00
Annabel Dunstone Gray bed783ac15
Rename btn-secondary to btn-default 2018-05-10 12:22:56 -07:00
Clement Ho b8401cd0b2 Merge branch 'master' into bootstrap4 2018-04-12 13:47:30 -05:00
Clement Ho 09ab85a936 Revert "Merge branch '44870-remove-extra-space-around-comment-form-on-merge-requests' into 'master'"
This reverts merge request !18120
2018-04-12 15:10:40 +00:00
Clement Ho 46031d63cd [skip ci] Convert panel related class names to card 2018-04-10 12:11:34 -05:00
Clement Ho 3ae87eef06 Replace .btn-group-justified with .btn-group.d-flex 2018-04-09 11:57:53 -05:00
Clement Ho 917b7e0dd9 Rename .btn-default to .btn-secondary 2018-04-09 11:49:18 -05:00
Takuya Noguchi 058909e7c5 Refactor and tweak margin for note forms on Issuable
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2018-04-04 22:27:15 +09:00
Simon Knox 39ee707c0a Don't show Jump to Discussion button on issue notes 2018-03-28 16:11:06 +11:00
Fatih Acet fdc9ae2edf
Prettify notes. 2018-03-16 23:16:21 +03:00
Fatih Acet 059ab73b8e Render MR Notes with Vue with behind a cookie 2018-02-28 00:10:43 +00:00
Filipa Lacerda cdc4938834
[ci skip] Fix more rules 2018-01-05 00:45:32 +00:00
Filipa Lacerda b299198e1e
Adds `eslint-plugin-vue`, fixes linter errors and adds docs 2018-01-03 23:14:55 +00:00
Simon Knox 874deb4142 rename remaining issue_ prefixed files 2017-12-09 07:24:52 +11:00