summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2019-03-07 12:34:05 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2019-03-07 12:34:05 +0000
commit41c6252111ef21daef2515119ed7791e43d64f49 (patch)
treef6b9edcfb34f8bd451afe7d6a87649ea9de7dc26
parente382611d3b5ea2f8c2bd6b6aa54b0f69702bff21 (diff)
parent66f25ea6c44fb1d73e437a2d33ef1a926d778c11 (diff)
downloadgitlab-ce-41c6252111ef21daef2515119ed7791e43d64f49.tar.gz
Merge branch 'winh-enable-reply_to_individual_notes' into 'master'
Enable reply_to_individual_notes feature flag by default Closes #30299 See merge request gitlab-org/gitlab-ce!25575
-rw-r--r--app/controllers/concerns/issuable_actions.rb2
-rw-r--r--app/models/individual_note_discussion.rb2
-rw-r--r--changelogs/unreleased/winh-enable-reply_to_individual_notes.yml5
-rw-r--r--doc/user/discussions/img/reply_to_comment.gifbin0 -> 508115 bytes
-rw-r--r--doc/user/discussions/img/reply_to_comment_button.pngbin0 -> 17224 bytes
-rw-r--r--doc/user/discussions/index.md25
-rw-r--r--spec/features/merge_request/user_posts_notes_spec.rb5
7 files changed, 32 insertions, 7 deletions
diff --git a/app/controllers/concerns/issuable_actions.rb b/app/controllers/concerns/issuable_actions.rb
index cd3fa641e89..05d88429cfe 100644
--- a/app/controllers/concerns/issuable_actions.rb
+++ b/app/controllers/concerns/issuable_actions.rb
@@ -8,7 +8,7 @@ module IssuableActions
before_action :authorize_destroy_issuable!, only: :destroy
before_action :authorize_admin_issuable!, only: :bulk_update
before_action only: :show do
- push_frontend_feature_flag(:reply_to_individual_notes)
+ push_frontend_feature_flag(:reply_to_individual_notes, default_enabled: true)
end
end
diff --git a/app/models/individual_note_discussion.rb b/app/models/individual_note_discussion.rb
index b4a661ae5b4..3b6b68a9c5f 100644
--- a/app/models/individual_note_discussion.rb
+++ b/app/models/individual_note_discussion.rb
@@ -14,7 +14,7 @@ class IndividualNoteDiscussion < Discussion
end
def can_convert_to_discussion?
- noteable.supports_replying_to_individual_notes? && Feature.enabled?(:reply_to_individual_notes)
+ noteable.supports_replying_to_individual_notes? && Feature.enabled?(:reply_to_individual_notes, default_enabled: true)
end
def convert_to_discussion!(save: false)
diff --git a/changelogs/unreleased/winh-enable-reply_to_individual_notes.yml b/changelogs/unreleased/winh-enable-reply_to_individual_notes.yml
new file mode 100644
index 00000000000..a9c280320dc
--- /dev/null
+++ b/changelogs/unreleased/winh-enable-reply_to_individual_notes.yml
@@ -0,0 +1,5 @@
+---
+title: Add button to start discussion from single comment
+merge_request: 25575
+author:
+type: added
diff --git a/doc/user/discussions/img/reply_to_comment.gif b/doc/user/discussions/img/reply_to_comment.gif
new file mode 100644
index 00000000000..c62f7fdb5fe
--- /dev/null
+++ b/doc/user/discussions/img/reply_to_comment.gif
Binary files differ
diff --git a/doc/user/discussions/img/reply_to_comment_button.png b/doc/user/discussions/img/reply_to_comment_button.png
new file mode 100644
index 00000000000..d362b19785c
--- /dev/null
+++ b/doc/user/discussions/img/reply_to_comment_button.png
Binary files differ
diff --git a/doc/user/discussions/index.md b/doc/user/discussions/index.md
index 1e2fad1efe9..02bfd2bec7a 100644
--- a/doc/user/discussions/index.md
+++ b/doc/user/discussions/index.md
@@ -10,8 +10,9 @@ You can leave a comment in the following places:
- commits
- commit diffs
-The comment area supports [Markdown] and [quick actions]. One can edit their
-own comment at any time, and anyone with [Maintainer access level][permissions] or
+The comment area supports [Markdown] and [quick actions]. Every individual
+comment can be [turned into a discussion](#start-a-discussion-by-replying-to-a-non-discussion-comment)
+One can also edit their own comment at any time, and anyone with [Maintainer access level][permissions] or
higher can also edit a comment made by someone else.
You could also reply to the notification email in order to reply to a comment,
@@ -339,6 +340,26 @@ and push the suggested change directly into the codebase in the merge request's
Custom commit messages will be introduced by
[#54404](https://gitlab.com/gitlab-org/gitlab-ce/issues/54404).
+## Start a discussion by replying to a non-discussion comment
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/30299) in GitLab 11.9
+
+To reply a non-discussion comment, you can use the **Reply to comment** button.
+
+![Reply to comment button](img/reply_to_comment_button.png)
+
+The **Reply to comment** button is only displayed if you have permissions to reply to an existing discussion, or start a discussion from a standalone comment.
+
+Clicking on the **Reply to comment** button will bring the reply area into focus and you can type your reply.
+
+![Reply to comment feature](img/reply_to_comment.gif)
+
+Relying to a non-discussion comment will convert the non-discussion comment to a
+threaded discussion once the reply is submitted. This conversion is considered an edit
+to the original comment, so a note about when it was last edited will appear underneath it.
+
+This feature only exists for Issues, Merge requests, and Epics. Commits, Snippets and Merge request diff discussions are not supported yet.
+
[ce-5022]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5022
[ce-7125]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7125
[ce-7527]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7527
diff --git a/spec/features/merge_request/user_posts_notes_spec.rb b/spec/features/merge_request/user_posts_notes_spec.rb
index 1bbcf455ac7..dc0862be6fc 100644
--- a/spec/features/merge_request/user_posts_notes_spec.rb
+++ b/spec/features/merge_request/user_posts_notes_spec.rb
@@ -67,7 +67,7 @@ describe 'Merge request > User posts notes', :js do
end
end
- describe 'when reply_to_individual_notes feature flag is not set' do
+ describe 'when reply_to_individual_notes feature flag is disabled' do
before do
stub_feature_flags(reply_to_individual_notes: false)
visit project_merge_request_path(project, merge_request)
@@ -78,9 +78,8 @@ describe 'Merge request > User posts notes', :js do
end
end
- describe 'when reply_to_individual_notes feature flag is set' do
+ describe 'when reply_to_individual_notes feature flag is not set' do
before do
- stub_feature_flags(reply_to_individual_notes: true)
visit project_merge_request_path(project, merge_request)
end