Commit e0118070 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 42a4a9ce 1bf93ec5
......@@ -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' }));
}
......
......@@ -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"
......
......@@ -98,6 +98,7 @@
.tree-table {
margin-bottom: 0;
table-layout: fixed;
tr {
border-bottom: 1px solid $white-normal;
......
......@@ -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)
......
---
title: Improve delete snippet feature spec
merge_request: 51020
author: Lee Tickett @leetickett
type: other
---
title: Fix table columm shift with table-layout fixed
merge_request: 51416
author:
type: fixed
---
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
......@@ -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
......@@ -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();
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment