Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a0010467
Commit
a0010467
authored
Mar 29, 2021
by
Kerri Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove remove_resolve_note feature flag
Added in 13.6
parent
d71b2196
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
29 additions
and
83 deletions
+29
-83
app/assets/javascripts/batch_comments/mixins/resolved_status.js
...sets/javascripts/batch_comments/mixins/resolved_status.js
+1
-7
app/assets/javascripts/notes/components/noteable_note.vue
app/assets/javascripts/notes/components/noteable_note.vue
+3
-8
app/assets/javascripts/notes/mixins/resolvable.js
app/assets/javascripts/notes/mixins/resolvable.js
+2
-15
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+0
-1
changelogs/unreleased/320756-remove-remove_resolve_note-feature-flag.yml
...leased/320756-remove-remove_resolve_note-feature-flag.yml
+5
-0
config/feature_flags/development/remove_resolve_note.yml
config/feature_flags/development/remove_resolve_note.yml
+0
-8
locale/gitlab.pot
locale/gitlab.pot
+0
-3
spec/features/discussion_comments/merge_request_spec.rb
spec/features/discussion_comments/merge_request_spec.rb
+0
-2
spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb
...ues/create_issue_for_discussions_in_merge_request_spec.rb
+1
-5
spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb
...eate_issue_for_single_discussion_in_merge_request_spec.rb
+1
-5
spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb
.../user_resolves_diff_notes_and_discussions_resolve_spec.rb
+13
-19
spec/frontend/notes/components/noteable_discussion_spec.js
spec/frontend/notes/components/noteable_discussion_spec.js
+1
-8
spec/support/shared_examples/features/discussion_comments_shared_example.rb
...d_examples/features/discussion_comments_shared_example.rb
+2
-2
No files found.
app/assets/javascripts/batch_comments/mixins/resolved_status.js
View file @
a0010467
import
{
mapGetters
}
from
'
vuex
'
;
import
{
sprintf
,
s__
,
__
}
from
'
~/locale
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
export
default
{
mixins
:
[
glFeatureFlagsMixin
()],
props
:
{
discussionId
:
{
type
:
String
,
...
...
@@ -54,11 +52,7 @@ export default {
resolveButtonTitle
()
{
if
(
this
.
isDraft
||
this
.
discussionId
)
return
this
.
resolvedStatusMessage
;
let
title
=
__
(
'
Mark as resolved
'
);
if
(
this
.
glFeatures
.
removeResolveNote
)
{
title
=
__
(
'
Resolve thread
'
);
}
let
title
=
__
(
'
Resolve thread
'
);
if
(
this
.
resolvedBy
)
{
title
=
sprintf
(
__
(
'
Resolved by %{name}
'
),
{
name
:
this
.
resolvedBy
.
name
});
...
...
app/assets/javascripts/notes/components/noteable_note.vue
View file @
a0010467
...
...
@@ -86,7 +86,7 @@ export default {
isRequesting
:
false
,
isResolving
:
false
,
commentLineStart
:
{},
resolveAsThread
:
t
his
.
glFeatures
.
removeResolveNot
e
,
resolveAsThread
:
t
ru
e
,
};
},
computed
:
{
...
...
@@ -139,14 +139,9 @@ export default {
return
this
.
note
.
isDraft
;
},
canResolve
()
{
if
(
this
.
glFeatures
.
removeResolveNote
&&
!
this
.
discussionRoot
)
return
false
;
if
(
!
this
.
discussionRoot
)
return
false
;
if
(
this
.
glFeatures
.
removeResolveNote
)
return
this
.
note
.
current_user
.
can_resolve_discussion
;
return
(
this
.
note
.
current_user
.
can_resolve
||
(
this
.
note
.
isDraft
&&
this
.
note
.
discussion_id
!==
null
)
);
return
this
.
note
.
current_user
.
can_resolve_discussion
;
},
lineRange
()
{
return
this
.
note
.
position
?.
line_range
;
...
...
app/assets/javascripts/notes/mixins/resolvable.js
View file @
a0010467
import
{
deprecatedCreateFlash
as
Flash
}
from
'
~/flash
'
;
import
{
__
}
from
'
~/locale
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
export
default
{
mixins
:
[
glFeatureFlagsMixin
()],
computed
:
{
discussionResolved
()
{
if
(
this
.
discussion
)
{
const
{
notes
,
resolved
}
=
this
.
discussion
;
if
(
this
.
glFeatures
.
removeResolveNote
)
{
return
Boolean
(
resolved
);
}
if
(
notes
)
{
// Decide resolved state using store. Only valid for discussions.
return
notes
.
filter
((
note
)
=>
!
note
.
system
).
every
((
note
)
=>
note
.
resolved
);
}
return
resolved
;
return
Boolean
(
this
.
discussion
.
resolved
);
}
return
this
.
note
.
resolved
;
...
...
@@ -47,7 +34,7 @@ export default {
let
endpoint
=
discussion
&&
this
.
discussion
?
this
.
discussion
.
resolve_path
:
`
${
this
.
note
.
path
}
/resolve`
;
if
(
this
.
glFeatures
.
removeResolveNote
&&
this
.
discussionResolvePath
)
{
if
(
this
.
discussionResolvePath
)
{
endpoint
=
this
.
discussionResolvePath
;
}
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
a0010467
...
...
@@ -37,7 +37,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag
(
:unified_diff_components
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:default_merge_ref_for_diffs
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:core_security_mr_widget_counts
,
@project
)
push_frontend_feature_flag
(
:remove_resolve_note
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:diffs_gradual_load
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:codequality_backend_comparison
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:local_file_reviews
,
default_enabled: :yaml
)
...
...
changelogs/unreleased/320756-remove-remove_resolve_note-feature-flag.yml
0 → 100644
View file @
a0010467
---
title
:
Remove remove_resolve_note feature flag
merge_request
:
57757
author
:
type
:
other
config/feature_flags/development/remove_resolve_note.yml
deleted
100644 → 0
View file @
d71b2196
---
name
:
remove_resolve_note
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45549
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/320756
milestone
:
'
13.6'
type
:
development
group
:
group::code review
default_enabled
:
true
locale/gitlab.pot
View file @
a0010467
...
...
@@ -18741,9 +18741,6 @@ msgstr ""
msgid "Mark as ready"
msgstr ""
msgid "Mark as resolved"
msgstr ""
msgid "Mark this issue as a duplicate of another issue"
msgstr ""
...
...
spec/features/discussion_comments/merge_request_spec.rb
View file @
a0010467
...
...
@@ -8,8 +8,6 @@ RSpec.describe 'Thread Comments Merge Request', :js do
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
before
do
stub_feature_flags
(
remove_resolve_note:
false
)
project
.
add_maintainer
(
user
)
sign_in
(
user
)
...
...
spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb
View file @
a0010467
...
...
@@ -18,10 +18,6 @@ RSpec.describe 'Resolving all open threads in a merge request from an issue', :j
end
end
before
do
stub_feature_flags
(
remove_resolve_note:
false
)
end
describe
'as a user with access to the project'
do
before
do
project
.
add_maintainer
(
user
)
...
...
@@ -37,7 +33,7 @@ RSpec.describe 'Resolving all open threads in a merge request from an issue', :j
context
'resolving the thread'
do
before
do
click_button
'Resolve thread'
find
(
'button[data-qa-selector="resolve_discussion_button"]'
).
click
end
it
'hides the link for creating a new issue'
do
...
...
spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb
View file @
a0010467
...
...
@@ -14,10 +14,6 @@ RSpec.describe 'Resolve an open thread in a merge request by creating an issue',
"a[title=
\"
#{
title
}
\"
][href=
\"
#{
url
}
\"
]"
end
before
do
stub_feature_flags
(
remove_resolve_note:
false
)
end
describe
'As a user with access to the project'
do
before
do
project
.
add_maintainer
(
user
)
...
...
@@ -39,7 +35,7 @@ RSpec.describe 'Resolve an open thread in a merge request by creating an issue',
context
'resolving the thread'
do
before
do
click_button
'Resolve thread'
find
(
'button[data-qa-selector="resolve_discussion_button"]'
).
click
end
it
'hides the link for creating a new issue'
do
...
...
spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb
View file @
a0010467
...
...
@@ -15,10 +15,6 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
diff_refs:
merge_request
.
diff_refs
)
end
before
do
stub_feature_flags
(
remove_resolve_note:
false
)
end
context
'no threads'
do
before
do
project
.
add_maintainer
(
user
)
...
...
@@ -67,7 +63,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
it
'allows user to mark thread as resolved'
do
page
.
within
'.diff-content'
do
click_button
'Resolve thread'
find
(
'button[data-qa-selector="resolve_discussion_button"]'
).
click
end
expect
(
page
).
to
have_selector
(
'.discussion-body'
,
visible:
false
)
...
...
@@ -84,7 +80,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
it
'allows user to unresolve thread'
do
page
.
within
'.diff-content'
do
click_button
'Resolve thread'
find
(
'button[data-qa-selector="resolve_discussion_button"]'
).
click
click_button
'Unresolve thread'
end
...
...
@@ -96,7 +92,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
describe
'resolved thread'
do
before
do
page
.
within
'.diff-content'
do
click_button
'Resolve thread'
find
(
'button[data-qa-selector="resolve_discussion_button"]'
).
click
end
visit_merge_request
...
...
@@ -197,7 +193,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
it
'allows user to resolve from reply form without a comment'
do
page
.
within
'.diff-content'
do
click_button
'Resolve thread'
find
(
'button[data-qa-selector="resolve_discussion_button"]'
).
click
end
page
.
within
'.line-resolve-all-container'
do
...
...
@@ -234,7 +230,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
it
'hides jump to next button when all resolved'
do
page
.
within
'.diff-content'
do
click_button
'Resolve thread'
find
(
'button[data-qa-selector="resolve_discussion_button"]'
).
click
end
expect
(
page
).
to
have_selector
(
'.discussion-next-btn'
,
visible:
false
)
...
...
@@ -264,7 +260,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
visit_merge_request
end
it
'
does not mark
thread as resolved when resolving single note'
do
it
'
marks
thread as resolved when resolving single note'
do
page
.
within
(
"#note_
#{
note
.
id
}
"
)
do
first
(
'.line-resolve-btn'
).
click
...
...
@@ -273,15 +269,13 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
expect
(
first
(
'.line-resolve-btn'
)[
'aria-label'
]).
to
eq
(
"Resolved by
#{
user
.
name
}
"
)
end
expect
(
page
).
to
have_content
(
'Last updated'
)
page
.
within
'.line-resolve-all-container'
do
expect
(
page
).
to
have_content
(
'
1 unresolved threa
d'
)
expect
(
page
).
to
have_content
(
'
All threads resolve
d'
)
end
end
it
'resolves thread'
do
resolve_buttons
=
page
.
all
(
'.note .line-resolve-btn'
,
count:
2
)
resolve_buttons
=
page
.
all
(
'.note .line-resolve-btn'
,
count:
1
)
resolve_buttons
.
each
do
|
button
|
button
.
click
end
...
...
@@ -332,7 +326,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
it
'allows user to mark all threads as resolved'
do
page
.
all
(
'.discussion-reply-holder'
,
count:
2
).
each
do
|
reply_holder
|
page
.
within
reply_holder
do
click_button
'Resolve thread'
find
(
'button[data-qa-selector="resolve_discussion_button"]'
).
click
end
end
...
...
@@ -344,7 +338,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
it
'allows user to quickly scroll to next unresolved thread'
do
page
.
within
(
'.discussion-reply-holder'
,
match: :first
)
do
click_button
'Resolve thread'
find
(
'button[data-qa-selector="resolve_discussion_button"]'
).
click
end
page
.
within
'.line-resolve-all-container'
do
...
...
@@ -416,7 +410,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
it
'allows user to mark thread as resolved'
do
page
.
within
'.diff-content'
do
click_button
'Resolve thread'
find
(
'button[data-qa-selector="resolve_discussion_button"]'
).
click
end
page
.
within
'.diff-content .note'
do
...
...
@@ -431,7 +425,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
it
'allows user to unresolve thread'
do
page
.
within
'.diff-content'
do
click_button
'Resolve thread'
find
(
'button[data-qa-selector="resolve_discussion_button"]'
).
click
click_button
'Unresolve thread'
end
...
...
@@ -459,7 +453,7 @@ RSpec.describe 'Merge request > User resolves diff notes and threads', :js do
it
'allows user to comment & unresolve thread'
do
page
.
within
'.diff-content'
do
click_button
'Resolve thread'
find
(
'button[data-qa-selector="resolve_discussion_button"]'
).
click
find_field
(
'Reply…'
).
click
...
...
spec/frontend/notes/components/noteable_discussion_spec.js
View file @
a0010467
...
...
@@ -124,14 +124,7 @@ describe('noteable_discussion component', () => {
...
getJSONFixture
(
discussionWithTwoUnresolvedNotes
)[
0
],
expanded
:
true
,
};
discussion
.
notes
=
discussion
.
notes
.
map
((
note
)
=>
({
...
note
,
resolved
:
false
,
current_user
:
{
...
note
.
current_user
,
can_resolve
:
true
,
},
}));
discussion
.
resolved
=
false
;
wrapper
.
setProps
({
discussion
});
...
...
spec/support/shared_examples/features/discussion_comments_shared_example.rb
View file @
a0010467
...
...
@@ -304,7 +304,7 @@ RSpec.shared_examples 'thread comments for issue, epic and merge request' do |re
let
(
:reply_id
)
{
find
(
"
#{
comments_selector
}
.note:last-of-type"
,
match: :first
)[
'data-note-id'
]
}
it
'can be replied to after resolving'
do
click_button
"Resolve thread"
find
(
'button[data-qa-selector="resolve_discussion_button"]'
).
click
wait_for_requests
refresh
...
...
@@ -316,7 +316,7 @@ RSpec.shared_examples 'thread comments for issue, epic and merge request' do |re
it
'shows resolved thread when toggled'
do
submit_reply
(
'a'
)
click_button
"Resolve thread"
find
(
'button[data-qa-selector="resolve_discussion_button"]'
).
click
wait_for_requests
expect
(
page
).
to
have_selector
(
".note-row-
#{
note_id
}
"
,
visible:
true
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment