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
a5d1c006
Commit
a5d1c006
authored
May 05, 2020
by
Thomas Randolph
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature flag for commit neighbor nav feature
parent
3c071011
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
app/assets/javascripts/diffs/components/app.vue
app/assets/javascripts/diffs/components/app.vue
+1
-1
app/assets/javascripts/diffs/components/commit_item.vue
app/assets/javascripts/diffs/components/commit_item.vue
+7
-1
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-0
No files found.
app/assets/javascripts/diffs/components/app.vue
View file @
a5d1c006
...
...
@@ -346,7 +346,7 @@ export default {
}
});
if
(
this
.
commit
)
{
if
(
this
.
commit
&&
this
.
glFeatures
.
mrCommitNeighborNav
)
{
Mousetrap
.
bind
(
'
c
'
,
()
=>
this
.
moveToNeighboringCommit
({
direction
:
'
next
'
}));
Mousetrap
.
bind
(
'
x
'
,
()
=>
this
.
moveToNeighboringCommit
({
direction
:
'
previous
'
}));
}
...
...
app/assets/javascripts/diffs/components/commit_item.vue
View file @
a5d1c006
...
...
@@ -2,6 +2,8 @@
import
{
mapActions
}
from
'
vuex
'
;
import
{
GlButtonGroup
,
GlButton
,
GlIcon
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
UserAvatarLink
from
'
~/vue_shared/components/user_avatar/user_avatar_link.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
ClipboardButton
from
'
~/vue_shared/components/clipboard_button.vue
'
;
...
...
@@ -48,6 +50,7 @@ export default {
directives
:
{
GlTooltip
:
GlTooltipDirective
,
},
mixins
:
[
glFeatureFlagsMixin
()],
props
:
{
commit
:
{
type
:
Object
,
...
...
@@ -160,7 +163,10 @@ export default {
class=
"btn btn-default"
/>
</div>
<div
v-if=
"hasNeighborCommits"
class=
"commit-nav-buttons ml-3"
>
<div
v-if=
"hasNeighborCommits && glFeatures.mrCommitNeighborNav"
class=
"commit-nav-buttons ml-3"
>
<gl-button-group>
<gl-button
:href=
"previousCommitUrl"
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
a5d1c006
...
...
@@ -27,6 +27,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag
(
:widget_visibility_polling
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:merge_ref_head_comments
,
@project
)
push_frontend_feature_flag
(
:accessibility_merge_request_widget
,
@project
)
push_frontend_feature_flag
(
:mr_commit_neighbor_nav
,
@project
,
default_enabled:
true
)
end
before_action
do
...
...
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