Commit 6fb978f0 authored by David O'Regan's avatar David O'Regan Committed by Nicolò Maria Mezzopera

Remove highlight_current_diff_row feature flag

parent f8186f8b
......@@ -41,10 +41,6 @@ export default {
return !this.hideFileStats && this.file.type === 'blob';
},
fileClasses() {
if (!this.glFeatures.highlightCurrentDiffRow) {
return '';
}
return this.file.type === 'blob' && !this.viewedFiles[this.file.fileHash]
? 'gl-font-weight-bold'
: '';
......
......@@ -36,7 +36,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag(:hide_jump_to_next_unresolved_in_threads, default_enabled: true)
push_frontend_feature_flag(:merge_request_widget_graphql, @project)
push_frontend_feature_flag(:unified_diff_components, @project)
push_frontend_feature_flag(:highlight_current_diff_row, @project)
push_frontend_feature_flag(:default_merge_ref_for_diffs, @project)
push_frontend_feature_flag(:core_security_mr_widget, @project, default_enabled: true)
push_frontend_feature_flag(:core_security_mr_widget_counts, @project)
......
---
title: Enable file tree highlighting by default
merge_request: 49356
author:
type: changed
---
name: highlight_current_diff_row
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27937
rollout_issue_url:
milestone: '13.4'
type: development
group: group::source code
default_enabled: false
......@@ -7,12 +7,9 @@ import ChangedFileIcon from '~/vue_shared/components/changed_file_icon.vue';
describe('Diff File Row component', () => {
let wrapper;
const createComponent = (props = {}, highlightCurrentDiffRow = false) => {
const createComponent = (props = {}) => {
wrapper = shallowMount(DiffFileRow, {
propsData: { ...props },
provide: {
glFeatures: { highlightCurrentDiffRow },
},
});
};
......@@ -60,26 +57,23 @@ describe('Diff File Row component', () => {
});
it.each`
features | fileType | isViewed | expected
${{ highlightCurrentDiffRow: true }} | ${'blob'} | ${false} | ${'gl-font-weight-bold'}
${{}} | ${'blob'} | ${true} | ${''}
${{}} | ${'tree'} | ${false} | ${''}
${{}} | ${'tree'} | ${true} | ${''}
fileType | isViewed | expected
${'blob'} | ${false} | ${'gl-font-weight-bold'}
${'blob'} | ${true} | ${''}
${'tree'} | ${false} | ${''}
${'tree'} | ${true} | ${''}
`(
'with (features="$features", fileType="$fileType", isViewed=$isViewed), sets fileClasses="$expected"',
({ features, fileType, isViewed, expected }) => {
createComponent(
{
file: {
type: fileType,
fileHash: '#123456789',
},
level: 0,
hideFileStats: false,
viewedFiles: isViewed ? { '#123456789': true } : {},
'with (fileType="$fileType", isViewed=$isViewed), sets fileClasses="$expected"',
({ fileType, isViewed, expected }) => {
createComponent({
file: {
type: fileType,
fileHash: '#123456789',
},
features.highlightCurrentDiffRow,
);
level: 0,
hideFileStats: false,
viewedFiles: isViewed ? { '#123456789': true } : {},
});
expect(wrapper.find(FileRow).props('fileClasses')).toBe(expected);
},
);
......
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