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
e0118070
Commit
e0118070
authored
Jan 13, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
42a4a9ce
1bf93ec5
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
22 additions
and
48 deletions
+22
-48
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
+1
-4
app/assets/stylesheets/pages/tree.scss
app/assets/stylesheets/pages/tree.scss
+1
-0
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+0
-1
changelogs/unreleased/263408-improve-delete-snippet-test.yml
changelogs/unreleased/263408-improve-delete-snippet-test.yml
+5
-0
changelogs/unreleased/285112-reduce-table-column-layout-shift.yml
...gs/unreleased/285112-reduce-table-column-layout-shift.yml
+5
-0
config/feature_flags/development/mr_commit_neighbor_nav.yml
config/feature_flags/development/mr_commit_neighbor_nav.yml
+0
-8
spec/features/projects/snippets/user_deletes_snippet_spec.rb
spec/features/projects/snippets/user_deletes_snippet_spec.rb
+3
-1
spec/frontend/diffs/components/app_spec.js
spec/frontend/diffs/components/app_spec.js
+5
-23
spec/frontend/diffs/components/commit_item_spec.js
spec/frontend/diffs/components/commit_item_spec.js
+1
-10
No files found.
app/assets/javascripts/diffs/components/app.vue
View file @
e0118070
...
...
@@ -425,7 +425,7 @@ export default {
}
});
if
(
this
.
commit
&&
this
.
glFeatures
.
mrCommitNeighborNav
)
{
if
(
this
.
commit
)
{
Mousetrap
.
bind
(
'
c
'
,
()
=>
this
.
moveToNeighboringCommit
({
direction
:
'
next
'
}));
Mousetrap
.
bind
(
'
x
'
,
()
=>
this
.
moveToNeighboringCommit
({
direction
:
'
previous
'
}));
}
...
...
app/assets/javascripts/diffs/components/commit_item.vue
View file @
e0118070
...
...
@@ -148,10 +148,7 @@ export default {
class=
"input-group-text"
/>
</gl-button-group>
<div
v-if=
"hasNeighborCommits && glFeatures.mrCommitNeighborNav"
class=
"commit-nav-buttons ml-3"
>
<div
v-if=
"hasNeighborCommits"
class=
"commit-nav-buttons ml-3"
>
<gl-button-group>
<gl-button
:href=
"previousCommitUrl"
...
...
app/assets/stylesheets/pages/tree.scss
View file @
e0118070
...
...
@@ -98,6 +98,7 @@
.tree-table
{
margin-bottom
:
0
;
table-layout
:
fixed
;
tr
{
border-bottom
:
1px
solid
$white-normal
;
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
e0118070
...
...
@@ -28,7 +28,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
before_action
:authenticate_user!
,
only:
[
:assign_related_issues
]
before_action
:check_user_can_push_to_source_branch!
,
only:
[
:rebase
]
before_action
only:
[
:show
]
do
push_frontend_feature_flag
(
:mr_commit_neighbor_nav
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:multiline_comments
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:file_identifier_hash
)
push_frontend_feature_flag
(
:batch_suggestions
,
@project
,
default_enabled:
true
)
...
...
changelogs/unreleased/263408-improve-delete-snippet-test.yml
0 → 100644
View file @
e0118070
---
title
:
Improve delete snippet feature spec
merge_request
:
51020
author
:
Lee Tickett @leetickett
type
:
other
changelogs/unreleased/285112-reduce-table-column-layout-shift.yml
0 → 100644
View file @
e0118070
---
title
:
Fix table columm shift with table-layout fixed
merge_request
:
51416
author
:
type
:
fixed
config/feature_flags/development/mr_commit_neighbor_nav.yml
deleted
100644 → 0
View file @
42a4a9ce
---
name
:
mr_commit_neighbor_nav
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/28596
rollout_issue_url
:
milestone
:
'
13.0'
type
:
development
group
:
group::code review
default_enabled
:
true
spec/features/projects/snippets/user_deletes_snippet_spec.rb
View file @
e0118070
...
...
@@ -21,6 +21,8 @@ RSpec.describe 'Projects > Snippets > User deletes a snippet', :js do
click_button
(
'Delete snippet'
)
wait_for_requests
expect
(
page
).
not_to
have_content
(
snippet
.
title
)
# This assertion also confirms we did not end up on an error page
expect
(
page
).
to
have_selector
(
'#new_snippet_link'
)
expect
(
project
.
snippets
.
length
).
to
eq
(
0
)
end
end
spec/frontend/diffs/components/app_spec.js
View file @
e0118070
...
...
@@ -288,7 +288,7 @@ describe('diffs/components/app', () => {
({
state
})
=>
{
state
.
diffs
.
commit
=
{
id
:
'
SHA123
'
};
},
{
glFeatures
:
{
mrCommitNeighborNav
:
true
,
...
featureFlags
}
},
{
glFeatures
:
featureFlags
},
);
moveSpy
=
jest
.
spyOn
(
wrapper
.
vm
,
'
moveToNeighboringCommit
'
).
mockImplementation
(()
=>
{});
...
...
@@ -303,8 +303,8 @@ describe('diffs/components/app', () => {
$
{
'
k
'
}
|
${
'
jumpToFile
'
}
|
${
0
}
|
${[
-
1
]}
|
${{}}
$
{
'
]
'
}
|
${
'
jumpToFile
'
}
|
${
0
}
|
${[
+
1
]}
|
${{}}
$
{
'
j
'
}
|
${
'
jumpToFile
'
}
|
${
0
}
|
${[
+
1
]}
|
${{}}
$
{
'
x
'
}
|
${
'
moveToNeighboringCommit
'
}
|
${
1
}
|
${[{
direction
:
'
previous
'
}]}
|
${{
mrCommitNeighborNav
:
true
}
}
${
'
c
'
}
|
${
'
moveToNeighboringCommit
'
}
|
${
1
}
|
${[{
direction
:
'
next
'
}]}
|
${{
mrCommitNeighborNav
:
true
}
}
$
{
'
x
'
}
|
${
'
moveToNeighboringCommit
'
}
|
${
1
}
|
${[{
direction
:
'
previous
'
}]}
|
${{}}
$
{
'
c
'
}
|
${
'
moveToNeighboringCommit
'
}
|
${
1
}
|
${[{
direction
:
'
next
'
}]}
|
${{}}
`(
'calls `
$name
()
` with correct parameters whenever the "$key" key is pressed',
async ({ key, spy, args, featureFlags }) => {
...
...
@@ -319,24 +319,6 @@ describe('diffs/components/app', () => {
},
);
it
.
each
`
key | name | spy | featureFlags
${
'
x
'
}
|
${
'
moveToNeighboringCommit
'
}
|
${
1
}
|
${{
mrCommitNeighborNav
:
false
}
}
${
'
c
'
}
|
${
'
moveToNeighboringCommit
'
}
|
${
1
}
|
${{
mrCommitNeighborNav
:
false
}
}
`
(
'
does not call `$name()` even when the correct key is pressed if the feature flag is disabled
'
,
async
({
key
,
spy
,
featureFlags
})
=>
{
setup
({
shouldShow
:
true
},
featureFlags
);
await
nextTick
();
expect
(
spies
[
spy
]).
not
.
toHaveBeenCalled
();
Mousetrap
.
trigger
(
key
);
expect
(
spies
[
spy
]).
not
.
toHaveBeenCalled
();
},
);
it.each`
key
|
name
|
spy
|
allowed
$
{
'
d
'
}
|
${
'
jumpToFile
'
}
|
${
0
}
|
${[
'
[
'
,
'
]
'
,
'
j
'
,
'
k
'
]}
...
...
@@ -344,7 +326,7 @@ describe('diffs/components/app', () => {
`
(
`does not call \`$name()\` when a key that is not one of \`$allowed\` is pressed`
,
async
({
key
,
spy
})
=>
{
setup
({
shouldShow
:
true
}
,
{
mrCommitNeighborNav
:
true
}
);
setup
({
shouldShow
:
true
});
await
nextTick
();
Mousetrap
.
trigger
(
key
);
...
...
@@ -356,7 +338,7 @@ describe('diffs/components/app', () => {
describe
(
'
hidden app
'
,
()
=>
{
beforeEach
(
async
()
=>
{
setup
({
shouldShow
:
false
}
,
{
mrCommitNeighborNav
:
true
}
);
setup
({
shouldShow
:
false
});
await
nextTick
();
Mousetrap
.
reset
();
...
...
spec/frontend/diffs/components/commit_item_spec.js
View file @
e0118070
...
...
@@ -44,10 +44,7 @@ describe('diffs/components/commit_item', () => {
...
propsData
,
},
provide
:
{
glFeatures
:
{
mrCommitNeighborNav
:
true
,
...
featureFlags
,
},
glFeatures
:
featureFlags
,
},
stubs
:
{
CommitPipelineStatus
:
true
,
...
...
@@ -224,12 +221,6 @@ describe('diffs/components/commit_item', () => {
expect
(
getCommitNavButtonsElement
().
exists
()).
toEqual
(
true
);
});
it
(
'
does not render the commit navigation buttons if the `mrCommitNeighborNav` feature flag is disabled
'
,
()
=>
{
mountComponent
({
commit
:
mrCommit
},
{
mrCommitNeighborNav
:
false
});
expect
(
getCommitNavButtonsElement
().
exists
()).
toEqual
(
false
);
});
describe
(
'
prev commit
'
,
()
=>
{
const
{
location
}
=
window
;
...
...
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