Commit 41c62521 authored by Grzegorz Bizon's avatar Grzegorz Bizon

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
parents e382611d 66f25ea6
...@@ -8,7 +8,7 @@ module IssuableActions ...@@ -8,7 +8,7 @@ module IssuableActions
before_action :authorize_destroy_issuable!, only: :destroy before_action :authorize_destroy_issuable!, only: :destroy
before_action :authorize_admin_issuable!, only: :bulk_update before_action :authorize_admin_issuable!, only: :bulk_update
before_action only: :show do 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
end end
......
...@@ -14,7 +14,7 @@ class IndividualNoteDiscussion < Discussion ...@@ -14,7 +14,7 @@ class IndividualNoteDiscussion < Discussion
end end
def can_convert_to_discussion? 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 end
def convert_to_discussion!(save: false) def convert_to_discussion!(save: false)
......
---
title: Add button to start discussion from single comment
merge_request: 25575
author:
type: added
...@@ -10,8 +10,9 @@ You can leave a comment in the following places: ...@@ -10,8 +10,9 @@ You can leave a comment in the following places:
- commits - commits
- commit diffs - commit diffs
The comment area supports [Markdown] and [quick actions]. One can edit their The comment area supports [Markdown] and [quick actions]. Every individual
own comment at any time, and anyone with [Maintainer access level][permissions] or 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. 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, 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 ...@@ -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 Custom commit messages will be introduced by
[#54404](https://gitlab.com/gitlab-org/gitlab-ce/issues/54404). [#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-5022]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5022
[ce-7125]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7125 [ce-7125]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7125
[ce-7527]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7527 [ce-7527]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7527
......
...@@ -67,7 +67,7 @@ describe 'Merge request > User posts notes', :js do ...@@ -67,7 +67,7 @@ describe 'Merge request > User posts notes', :js do
end end
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 before do
stub_feature_flags(reply_to_individual_notes: false) stub_feature_flags(reply_to_individual_notes: false)
visit project_merge_request_path(project, merge_request) visit project_merge_request_path(project, merge_request)
...@@ -78,9 +78,8 @@ describe 'Merge request > User posts notes', :js do ...@@ -78,9 +78,8 @@ describe 'Merge request > User posts notes', :js do
end end
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 before do
stub_feature_flags(reply_to_individual_notes: true)
visit project_merge_request_path(project, merge_request) visit project_merge_request_path(project, merge_request)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment