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 { ...@@ -41,10 +41,6 @@ export default {
return !this.hideFileStats && this.file.type === 'blob'; return !this.hideFileStats && this.file.type === 'blob';
}, },
fileClasses() { fileClasses() {
if (!this.glFeatures.highlightCurrentDiffRow) {
return '';
}
return this.file.type === 'blob' && !this.viewedFiles[this.file.fileHash] return this.file.type === 'blob' && !this.viewedFiles[this.file.fileHash]
? 'gl-font-weight-bold' ? 'gl-font-weight-bold'
: ''; : '';
......
...@@ -36,7 +36,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -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(:hide_jump_to_next_unresolved_in_threads, default_enabled: true)
push_frontend_feature_flag(:merge_request_widget_graphql, @project) push_frontend_feature_flag(:merge_request_widget_graphql, @project)
push_frontend_feature_flag(:unified_diff_components, @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(: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, @project, default_enabled: true)
push_frontend_feature_flag(:core_security_mr_widget_counts, @project) 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'; ...@@ -7,12 +7,9 @@ import ChangedFileIcon from '~/vue_shared/components/changed_file_icon.vue';
describe('Diff File Row component', () => { describe('Diff File Row component', () => {
let wrapper; let wrapper;
const createComponent = (props = {}, highlightCurrentDiffRow = false) => { const createComponent = (props = {}) => {
wrapper = shallowMount(DiffFileRow, { wrapper = shallowMount(DiffFileRow, {
propsData: { ...props }, propsData: { ...props },
provide: {
glFeatures: { highlightCurrentDiffRow },
},
}); });
}; };
...@@ -60,26 +57,23 @@ describe('Diff File Row component', () => { ...@@ -60,26 +57,23 @@ describe('Diff File Row component', () => {
}); });
it.each` it.each`
features | fileType | isViewed | expected fileType | isViewed | expected
${{ highlightCurrentDiffRow: true }} | ${'blob'} | ${false} | ${'gl-font-weight-bold'} ${'blob'} | ${false} | ${'gl-font-weight-bold'}
${{}} | ${'blob'} | ${true} | ${''} ${'blob'} | ${true} | ${''}
${{}} | ${'tree'} | ${false} | ${''} ${'tree'} | ${false} | ${''}
${{}} | ${'tree'} | ${true} | ${''} ${'tree'} | ${true} | ${''}
`( `(
'with (features="$features", fileType="$fileType", isViewed=$isViewed), sets fileClasses="$expected"', 'with (fileType="$fileType", isViewed=$isViewed), sets fileClasses="$expected"',
({ features, fileType, isViewed, expected }) => { ({ fileType, isViewed, expected }) => {
createComponent( createComponent({
{ file: {
file: { type: fileType,
type: fileType, fileHash: '#123456789',
fileHash: '#123456789',
},
level: 0,
hideFileStats: false,
viewedFiles: isViewed ? { '#123456789': true } : {},
}, },
features.highlightCurrentDiffRow, level: 0,
); hideFileStats: false,
viewedFiles: isViewed ? { '#123456789': true } : {},
});
expect(wrapper.find(FileRow).props('fileClasses')).toBe(expected); 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