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
f43c5ef4
Commit
f43c5ef4
authored
Mar 12, 2021
by
Thomas Randolph
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bring the metadata endpoint into the MR Notes app
parent
433ae04f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
app/assets/javascripts/mr_notes/init_notes.js
app/assets/javascripts/mr_notes/init_notes.js
+5
-1
app/views/projects/merge_requests/show.html.haml
app/views/projects/merge_requests/show.html.haml
+1
-0
No files found.
app/assets/javascripts/mr_notes/init_notes.js
View file @
f43c5ef4
...
...
@@ -25,6 +25,9 @@ export default () => {
return
{
noteableData
,
endpoints
:
{
metadata
:
notesDataset
.
endpointMetadata
,
},
currentUserData
:
JSON
.
parse
(
notesDataset
.
currentUserData
),
notesData
:
JSON
.
parse
(
notesDataset
.
notesData
),
helpPagePath
:
notesDataset
.
helpPagePath
,
...
...
@@ -54,6 +57,7 @@ export default () => {
},
created
()
{
this
.
setActiveTab
(
window
.
mrTabs
.
getCurrentAction
());
this
.
setEndpoints
(
this
.
endpoints
);
},
mounted
()
{
this
.
notesCountBadge
=
$
(
'
.issuable-details
'
).
find
(
'
.notes-tab .badge
'
);
...
...
@@ -65,7 +69,7 @@ export default () => {
window
.
mrTabs
.
eventHub
.
$off
(
'
MergeRequestTabChange
'
,
this
.
setActiveTab
);
},
methods
:
{
...
mapActions
([
'
setActiveTab
'
]),
...
mapActions
([
'
setActiveTab
'
,
'
setEndpoints
'
]),
updateDiscussionTabCounter
()
{
this
.
notesCountBadge
.
text
(
this
.
discussionTabCounter
);
},
...
...
app/views/projects/merge_requests/show.html.haml
View file @
f43c5ef4
...
...
@@ -63,6 +63,7 @@
-
add_page_startup_api_call
widget_project_json_merge_request_path
(
@project
,
@merge_request
,
format: :json
)
-
add_page_startup_api_call
cached_widget_project_json_merge_request_path
(
@project
,
@merge_request
,
format: :json
)
#js-vue-mr-discussions
{
data:
{
notes_data:
notes_data
(
@merge_request
,
Feature
.
enabled?
(
:paginated_notes
,
@project
)).
to_json
,
endpoint_metadata:
@endpoint_metadata_url
,
noteable_data:
serialize_issuable
(
@merge_request
,
serializer:
'noteable'
),
noteable_type:
'MergeRequest'
,
target_type:
'merge_request'
,
...
...
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