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
2cee77dc
Commit
2cee77dc
authored
Jan 23, 2020
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove async merge request widget feature flag
Closes
https://gitlab.com/gitlab-org/gitlab/issues/42724
parent
50aa5143
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
21 deletions
+25
-21
app/assets/javascripts/mr_notes/init_notes.js
app/assets/javascripts/mr_notes/init_notes.js
+13
-1
app/assets/javascripts/pages/projects/merge_requests/init_merge_request_show.js
.../pages/projects/merge_requests/init_merge_request_show.js
+0
-2
app/assets/javascripts/vue_merge_request_widget/index.js
app/assets/javascripts/vue_merge_request_widget/index.js
+2
-0
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
...avascripts/vue_merge_request_widget/mr_widget_options.vue
+5
-9
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+0
-1
app/serializers/merge_request_widget_entity.rb
app/serializers/merge_request_widget_entity.rb
+0
-8
changelogs/unreleased/ph-42724-removeAsyncMRWidgetFlag.yml
changelogs/unreleased/ph-42724-removeAsyncMRWidgetFlag.yml
+5
-0
No files found.
app/assets/javascripts/mr_notes/init_notes.js
View file @
2cee77dc
...
...
@@ -4,6 +4,7 @@ import { mapActions, mapState, mapGetters } from 'vuex';
import
store
from
'
ee_else_ce/mr_notes/stores
'
;
import
notesApp
from
'
../notes/components/notes_app.vue
'
;
import
discussionKeyboardNavigator
from
'
../notes/components/discussion_keyboard_navigator.vue
'
;
import
initWidget
from
'
../vue_merge_request_widget
'
;
export
default
()
=>
{
// eslint-disable-next-line no-new
...
...
@@ -32,11 +33,22 @@ export default () => {
...
mapState
({
activeTab
:
state
=>
state
.
page
.
activeTab
,
}),
isShowTabActive
()
{
return
this
.
activeTab
===
'
show
'
;
},
},
watch
:
{
discussionTabCounter
()
{
this
.
updateDiscussionTabCounter
();
},
isShowTabActive
:
{
handler
(
newVal
)
{
if
(
newVal
)
{
initWidget
();
}
},
immediate
:
true
,
},
},
created
()
{
this
.
setActiveTab
(
window
.
mrTabs
.
getCurrentAction
());
...
...
@@ -69,7 +81,7 @@ export default () => {
noteableData
:
this
.
noteableData
,
notesData
:
this
.
notesData
,
userData
:
this
.
currentUserData
,
shouldShow
:
this
.
activeTab
===
'
show
'
,
shouldShow
:
this
.
isShowTabActive
,
helpPagePath
:
this
.
helpPagePath
,
},
}),
...
...
app/assets/javascripts/pages/projects/merge_requests/init_merge_request_show.js
View file @
2cee77dc
...
...
@@ -7,7 +7,6 @@ import initPipelines from '~/commit/pipelines/pipelines_bundle';
import
initVueIssuableSidebarApp
from
'
~/issuable_sidebar/sidebar_bundle
'
;
import
initSourcegraph
from
'
~/sourcegraph
'
;
import
initPopover
from
'
~/mr_tabs_popover
'
;
import
initWidget
from
'
../../../vue_merge_request_widget
'
;
export
default
function
()
{
new
ZenMode
();
// eslint-disable-line no-new
...
...
@@ -20,7 +19,6 @@ export default function() {
new
ShortcutsIssuable
(
true
);
// eslint-disable-line no-new
handleLocationHash
();
howToMerge
();
initWidget
();
initSourcegraph
();
const
tabHighlightEl
=
document
.
querySelector
(
'
.js-tabs-feature-highlight
'
);
...
...
app/assets/javascripts/vue_merge_request_widget/index.js
View file @
2cee77dc
...
...
@@ -5,6 +5,8 @@ import Translate from '../vue_shared/translate';
Vue
.
use
(
Translate
);
export
default
()
=>
{
if
(
gl
.
mrWidget
)
return
;
gl
.
mrWidgetData
.
gitlabLogo
=
gon
.
gitlab_logo
;
const
vm
=
new
Vue
(
MrWidgetOptions
);
...
...
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
View file @
2cee77dc
...
...
@@ -135,15 +135,11 @@ export default {
},
},
mounted
()
{
if
(
gon
&&
gon
.
features
&&
gon
.
features
.
asyncMrWidget
)
{
MRWidgetService
.
fetchInitialData
()
.
then
(({
data
})
=>
this
.
initWidget
(
data
))
.
catch
(()
=>
createFlash
(
__
(
'
Unable to load the merge request widget. Try reloading the page.
'
)),
);
}
else
{
this
.
initWidget
();
}
MRWidgetService
.
fetchInitialData
()
.
then
(({
data
})
=>
this
.
initWidget
(
data
))
.
catch
(()
=>
createFlash
(
__
(
'
Unable to load the merge request widget. Try reloading the page.
'
)),
);
},
beforeDestroy
()
{
eventHub
.
$off
(
'
mr.discussion.updated
'
,
this
.
checkStatus
);
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
2cee77dc
...
...
@@ -25,7 +25,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
before_action
do
push_frontend_feature_flag
(
:vue_issuable_sidebar
,
@project
.
group
)
push_frontend_feature_flag
(
:async_mr_widget
,
@project
)
end
around_action
:allow_gitaly_ref_name_caching
,
only:
[
:index
,
:show
,
:discussions
]
...
...
app/serializers/merge_request_widget_entity.rb
View file @
2cee77dc
...
...
@@ -67,14 +67,6 @@ class MergeRequestWidgetEntity < Grape::Entity
end
end
def
as_json
(
options
=
{})
return
super
(
options
)
if
Feature
.
enabled?
(
:async_mr_widget
)
super
(
options
)
.
merge
(
MergeRequestPollCachedWidgetEntity
.
new
(
object
,
**
@options
.
opts_hash
).
as_json
(
options
))
.
merge
(
MergeRequestPollWidgetEntity
.
new
(
object
,
**
@options
.
opts_hash
).
as_json
(
options
))
end
private
delegate
:current_user
,
to: :request
...
...
changelogs/unreleased/ph-42724-removeAsyncMRWidgetFlag.yml
0 → 100644
View file @
2cee77dc
---
title
:
Fetch merge request widget data asynchronous
merge_request
:
23594
author
:
type
:
changed
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