Commit 6af664b5 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'ph/341809/removeFluidChangesLayoutFlag' into 'master'

Remove mr_changes_fluid_layout feature flag

See merge request gitlab-org/gitlab!78696
parents e0af53c8 32943bd5
...@@ -29,7 +29,6 @@ import { ...@@ -29,7 +29,6 @@ import {
MAX_TREE_WIDTH, MAX_TREE_WIDTH,
TREE_HIDE_STATS_WIDTH, TREE_HIDE_STATS_WIDTH,
MR_TREE_SHOW_KEY, MR_TREE_SHOW_KEY,
CENTERED_LIMITED_CONTAINER_CLASSES,
ALERT_OVERFLOW_HIDDEN, ALERT_OVERFLOW_HIDDEN,
ALERT_MERGE_CONFLICT, ALERT_MERGE_CONFLICT,
ALERT_COLLAPSED_FILES, ALERT_COLLAPSED_FILES,
...@@ -253,13 +252,6 @@ export default { ...@@ -253,13 +252,6 @@ export default {
hideFileStats() { hideFileStats() {
return this.treeWidth <= TREE_HIDE_STATS_WIDTH; return this.treeWidth <= TREE_HIDE_STATS_WIDTH;
}, },
isLimitedContainer() {
if (this.glFeatures.mrChangesFluidLayout) {
return false;
}
return !this.renderFileTree && !this.isParallelView && !this.isFluidLayout;
},
isFullChangeset() { isFullChangeset() {
return this.startVersion === null && this.latestDiff; return this.startVersion === null && this.latestDiff;
}, },
...@@ -395,8 +387,6 @@ export default { ...@@ -395,8 +387,6 @@ export default {
this.adjustView(); this.adjustView();
this.subscribeToEvents(); this.subscribeToEvents();
this.CENTERED_LIMITED_CONTAINER_CLASSES = CENTERED_LIMITED_CONTAINER_CLASSES;
this.unwatchDiscussions = this.$watch( this.unwatchDiscussions = this.$watch(
() => `${this.diffFiles.length}:${this.$store.state.notes.discussions.length}`, () => `${this.diffFiles.length}:${this.$store.state.notes.discussions.length}`,
() => this.setDiscussions(), () => this.setDiscussions(),
...@@ -643,10 +633,7 @@ export default { ...@@ -643,10 +633,7 @@ export default {
<div v-show="shouldShow"> <div v-show="shouldShow">
<div v-if="isLoading || !isTreeLoaded" class="loading"><gl-loading-icon size="lg" /></div> <div v-if="isLoading || !isTreeLoaded" class="loading"><gl-loading-icon size="lg" /></div>
<div v-else id="diffs" :class="{ active: shouldShow }" class="diffs tab-pane"> <div v-else id="diffs" :class="{ active: shouldShow }" class="diffs tab-pane">
<compare-versions <compare-versions :diff-files-count-text="numTotalFiles" />
:is-limited-container="isLimitedContainer"
:diff-files-count-text="numTotalFiles"
/>
<template v-if="!isBatchLoadingError"> <template v-if="!isBatchLoadingError">
<hidden-files-warning <hidden-files-warning
...@@ -656,10 +643,7 @@ export default { ...@@ -656,10 +643,7 @@ export default {
:plain-diff-path="plainDiffPath" :plain-diff-path="plainDiffPath"
:email-patch-path="emailPatchPath" :email-patch-path="emailPatchPath"
/> />
<collapsed-files-warning <collapsed-files-warning v-if="visibleWarning == $options.alerts.ALERT_COLLAPSED_FILES" />
v-if="visibleWarning == $options.alerts.ALERT_COLLAPSED_FILES"
:limited="isLimitedContainer"
/>
</template> </template>
<div <div
...@@ -681,12 +665,7 @@ export default { ...@@ -681,12 +665,7 @@ export default {
/> />
<tree-list :hide-file-stats="hideFileStats" /> <tree-list :hide-file-stats="hideFileStats" />
</div> </div>
<div <div class="col-12 col-md-auto diff-files-holder">
class="col-12 col-md-auto diff-files-holder"
:class="{
[CENTERED_LIMITED_CONTAINER_CLASSES]: isLimitedContainer,
}"
>
<commit-widget v-if="commit" :commit="commit" :collapsible="false" /> <commit-widget v-if="commit" :commit="commit" :collapsible="false" />
<gl-alert <gl-alert
v-if="isBatchLoadingError" v-if="isBatchLoadingError"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { GlAlert, GlButton } from '@gitlab/ui'; import { GlAlert, GlButton } from '@gitlab/ui';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import { CENTERED_LIMITED_CONTAINER_CLASSES, EVT_EXPAND_ALL_FILES } from '../constants'; import { EVT_EXPAND_ALL_FILES } from '../constants';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
export default { export default {
...@@ -11,11 +11,6 @@ export default { ...@@ -11,11 +11,6 @@ export default {
GlButton, GlButton,
}, },
props: { props: {
limited: {
type: Boolean,
required: false,
default: false,
},
dismissed: { dismissed: {
type: Boolean, type: Boolean,
required: false, required: false,
...@@ -29,11 +24,6 @@ export default { ...@@ -29,11 +24,6 @@ export default {
}, },
computed: { computed: {
...mapState('diffs', ['diffFiles']), ...mapState('diffs', ['diffFiles']),
containerClasses() {
return {
[CENTERED_LIMITED_CONTAINER_CLASSES]: this.limited,
};
},
shouldDisplay() { shouldDisplay() {
return !this.isDismissed && this.diffFiles.length > 1; return !this.isDismissed && this.diffFiles.length > 1;
}, },
...@@ -53,7 +43,7 @@ export default { ...@@ -53,7 +43,7 @@ export default {
</script> </script>
<template> <template>
<div v-if="shouldDisplay" data-testid="root" :class="containerClasses" class="col-12"> <div v-if="shouldDisplay" data-testid="root" class="col-12">
<gl-alert <gl-alert
:dismissible="true" :dismissible="true"
:title="__('Some changes are not shown')" :title="__('Some changes are not shown')"
......
...@@ -3,7 +3,7 @@ import { GlTooltipDirective, GlIcon, GlLink, GlButtonGroup, GlButton, GlSprintf ...@@ -3,7 +3,7 @@ import { GlTooltipDirective, GlIcon, GlLink, GlButtonGroup, GlButton, GlSprintf
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import { __ } from '~/locale'; import { __ } from '~/locale';
import { setUrlParams } from '../../lib/utils/url_utility'; import { setUrlParams } from '../../lib/utils/url_utility';
import { CENTERED_LIMITED_CONTAINER_CLASSES, EVT_EXPAND_ALL_FILES } from '../constants'; import { EVT_EXPAND_ALL_FILES } from '../constants';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
import CompareDropdownLayout from './compare_dropdown_layout.vue'; import CompareDropdownLayout from './compare_dropdown_layout.vue';
import DiffStats from './diff_stats.vue'; import DiffStats from './diff_stats.vue';
...@@ -24,11 +24,6 @@ export default { ...@@ -24,11 +24,6 @@ export default {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
}, },
props: { props: {
isLimitedContainer: {
type: Boolean,
required: false,
default: false,
},
diffFilesCountText: { diffFilesCountText: {
type: String, type: String,
required: false, required: false,
...@@ -73,9 +68,6 @@ export default { ...@@ -73,9 +68,6 @@ export default {
return this.commit && (this.commit.next_commit_id || this.commit.prev_commit_id); return this.commit && (this.commit.next_commit_id || this.commit.prev_commit_id);
}, },
}, },
created() {
this.CENTERED_LIMITED_CONTAINER_CLASSES = CENTERED_LIMITED_CONTAINER_CLASSES;
},
methods: { methods: {
...mapActions('diffs', ['setInlineDiffViewType', 'setParallelDiffViewType', 'setShowTreeList']), ...mapActions('diffs', ['setInlineDiffViewType', 'setParallelDiffViewType', 'setShowTreeList']),
expandAllFiles() { expandAllFiles() {
...@@ -88,12 +80,7 @@ export default { ...@@ -88,12 +80,7 @@ export default {
<template> <template>
<div class="mr-version-controls border-top"> <div class="mr-version-controls border-top">
<div <div class="mr-version-menus-container content-block">
class="mr-version-menus-container content-block"
:class="{
[CENTERED_LIMITED_CONTAINER_CLASSES]: isLimitedContainer,
}"
>
<gl-button <gl-button
v-if="hasChanges" v-if="hasChanges"
v-gl-tooltip.hover v-gl-tooltip.hover
......
<script> <script>
import { GlButton, GlAlert, GlModalDirective } from '@gitlab/ui'; import { GlButton, GlAlert, GlModalDirective } from '@gitlab/ui';
import { CENTERED_LIMITED_CONTAINER_CLASSES } from '../constants';
export default { export default {
components: { components: {
...@@ -11,10 +10,6 @@ export default { ...@@ -11,10 +10,6 @@ export default {
GlModalDirective, GlModalDirective,
}, },
props: { props: {
limited: {
type: Boolean,
required: true,
},
mergeable: { mergeable: {
type: Boolean, type: Boolean,
required: true, required: true,
...@@ -24,18 +19,11 @@ export default { ...@@ -24,18 +19,11 @@ export default {
required: true, required: true,
}, },
}, },
computed: {
containerClasses() {
return {
[CENTERED_LIMITED_CONTAINER_CLASSES]: this.limited,
};
},
},
}; };
</script> </script>
<template> <template>
<div :class="containerClasses"> <div>
<gl-alert <gl-alert
:dismissible="false" :dismissible="false"
:title="__('There are merge conflicts')" :title="__('There are merge conflicts')"
......
...@@ -50,9 +50,6 @@ export const NEW_LINE_KEY = 'new_line'; ...@@ -50,9 +50,6 @@ export const NEW_LINE_KEY = 'new_line';
export const TYPE_KEY = 'type'; export const TYPE_KEY = 'type';
export const LEFT_LINE_KEY = 'left'; export const LEFT_LINE_KEY = 'left';
export const CENTERED_LIMITED_CONTAINER_CLASSES =
'container-limited limit-container-width mx-lg-auto px-3';
export const MAX_RENDERING_DIFF_LINES = 500; export const MAX_RENDERING_DIFF_LINES = 500;
export const MAX_RENDERING_BULK_ROWS = 30; export const MAX_RENDERING_BULK_ROWS = 30;
export const MIN_RENDERING_MS = 2; export const MIN_RENDERING_MS = 2;
......
...@@ -40,7 +40,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -40,7 +40,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag(:improved_emoji_picker, project, default_enabled: :yaml) push_frontend_feature_flag(:improved_emoji_picker, project, default_enabled: :yaml)
push_frontend_feature_flag(:diffs_virtual_scrolling, project, default_enabled: :yaml) push_frontend_feature_flag(:diffs_virtual_scrolling, project, default_enabled: :yaml)
push_frontend_feature_flag(:restructured_mr_widget, project, default_enabled: :yaml) push_frontend_feature_flag(:restructured_mr_widget, project, default_enabled: :yaml)
push_frontend_feature_flag(:mr_changes_fluid_layout, project, default_enabled: :yaml)
push_frontend_feature_flag(:mr_attention_requests, project, default_enabled: :yaml) push_frontend_feature_flag(:mr_attention_requests, project, default_enabled: :yaml)
push_frontend_feature_flag(:refactor_mr_widgets_extensions, @project, default_enabled: :yaml) push_frontend_feature_flag(:refactor_mr_widgets_extensions, @project, default_enabled: :yaml)
push_frontend_feature_flag(:rebase_without_ci_ui, @project, default_enabled: :yaml) push_frontend_feature_flag(:rebase_without_ci_ui, @project, default_enabled: :yaml)
......
---
name: mr_changes_fluid_layout
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70815
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/341809
milestone: '14.4'
type: development
group: group::code review
default_enabled: true
...@@ -154,22 +154,6 @@ describe('diffs/components/app', () => { ...@@ -154,22 +154,6 @@ describe('diffs/components/app', () => {
}); });
}); });
it.each`
props | state | expected
${{ isFluidLayout: true }} | ${{ isParallelView: false }} | ${false}
${{}} | ${{ isParallelView: false }} | ${true}
${{}} | ${{ showTreeList: true, diffFiles: [{}], isParallelView: false }} | ${false}
${{}} | ${{ showTreeList: false, diffFiles: [{}], isParallelView: false }} | ${true}
${{}} | ${{ showTreeList: false, diffFiles: [], isParallelView: false }} | ${true}
`(
'uses container-limiting classes ($expected) with state ($state) and props ($props)',
({ props, state, expected }) => {
createComponent(props, ({ state: origState }) => Object.assign(origState.diffs, state));
expect(wrapper.find('.container-limited.limit-container-width').exists()).toBe(expected);
},
);
it('displays loading icon on loading', () => { it('displays loading icon on loading', () => {
createComponent({}, ({ state }) => { createComponent({}, ({ state }) => {
state.diffs.isLoading = true; state.diffs.isLoading = true;
...@@ -498,7 +482,6 @@ describe('diffs/components/app', () => { ...@@ -498,7 +482,6 @@ describe('diffs/components/app', () => {
expect(wrapper.find(CompareVersions).exists()).toBe(true); expect(wrapper.find(CompareVersions).exists()).toBe(true);
expect(wrapper.find(CompareVersions).props()).toEqual( expect(wrapper.find(CompareVersions).props()).toEqual(
expect.objectContaining({ expect.objectContaining({
isLimitedContainer: false,
diffFilesCountText: null, diffFilesCountText: null,
}), }),
); );
......
...@@ -2,7 +2,7 @@ import { shallowMount, mount } from '@vue/test-utils'; ...@@ -2,7 +2,7 @@ import { shallowMount, mount } from '@vue/test-utils';
import Vue, { nextTick } from 'vue'; import Vue, { nextTick } from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import CollapsedFilesWarning from '~/diffs/components/collapsed_files_warning.vue'; import CollapsedFilesWarning from '~/diffs/components/collapsed_files_warning.vue';
import { CENTERED_LIMITED_CONTAINER_CLASSES, EVT_EXPAND_ALL_FILES } from '~/diffs/constants'; import { EVT_EXPAND_ALL_FILES } from '~/diffs/constants';
import eventHub from '~/diffs/event_hub'; import eventHub from '~/diffs/event_hub';
import createStore from '~/diffs/store/modules'; import createStore from '~/diffs/store/modules';
...@@ -13,7 +13,6 @@ const propsData = { ...@@ -13,7 +13,6 @@ const propsData = {
mergeable: true, mergeable: true,
resolutionPath: 'a-path', resolutionPath: 'a-path',
}; };
const limitedClasses = CENTERED_LIMITED_CONTAINER_CLASSES.split(' ');
async function files(store, count) { async function files(store, count) {
const copies = Array(count).fill(file); const copies = Array(count).fill(file);
...@@ -51,20 +50,6 @@ describe('CollapsedFilesWarning', () => { ...@@ -51,20 +50,6 @@ describe('CollapsedFilesWarning', () => {
}); });
describe('when there is more than one file', () => { describe('when there is more than one file', () => {
it.each`
limited | containerClasses
${true} | ${limitedClasses}
${false} | ${[]}
`(
'has the correct container classes when limited is $limited',
async ({ limited, containerClasses }) => {
createComponent({ limited });
await files(store, 2);
expect(wrapper.classes()).toEqual(['col-12'].concat(containerClasses));
},
);
it.each` it.each`
present | dismissed present | dismissed
${false} | ${true} ${false} | ${true}
......
...@@ -38,7 +38,6 @@ describe('CompareVersions', () => { ...@@ -38,7 +38,6 @@ describe('CompareVersions', () => {
}, },
}); });
}; };
const findLimitedContainer = () => wrapper.find('.container-limited.limit-container-width');
const findCompareSourceDropdown = () => wrapper.find('.mr-version-dropdown'); const findCompareSourceDropdown = () => wrapper.find('.mr-version-dropdown');
const findCompareTargetDropdown = () => wrapper.find('.mr-version-compare-dropdown'); const findCompareTargetDropdown = () => wrapper.find('.mr-version-compare-dropdown');
const getCommitNavButtonsElement = () => wrapper.find('.commit-nav-buttons'); const getCommitNavButtonsElement = () => wrapper.find('.commit-nav-buttons');
...@@ -98,18 +97,6 @@ describe('CompareVersions', () => { ...@@ -98,18 +97,6 @@ describe('CompareVersions', () => {
expect(inlineBtn.html()).toContain('Inline'); expect(inlineBtn.html()).toContain('Inline');
expect(parallelBtn.html()).toContain('Side-by-side'); expect(parallelBtn.html()).toContain('Side-by-side');
}); });
it('adds container-limiting classes when showFileTree is false with inline diffs', () => {
createWrapper({ isLimitedContainer: true });
expect(findLimitedContainer().exists()).toBe(true);
});
it('does not add container-limiting classes when showFileTree is false with inline diffs', () => {
createWrapper({ isLimitedContainer: false });
expect(findLimitedContainer().exists()).toBe(false);
});
}); });
describe('noChangedFiles', () => { describe('noChangedFiles', () => {
......
import { shallowMount, mount } from '@vue/test-utils'; import { shallowMount, mount } from '@vue/test-utils';
import MergeConflictWarning from '~/diffs/components/merge_conflict_warning.vue'; import MergeConflictWarning from '~/diffs/components/merge_conflict_warning.vue';
import { CENTERED_LIMITED_CONTAINER_CLASSES } from '~/diffs/constants';
const propsData = { const propsData = {
limited: true, limited: true,
mergeable: true, mergeable: true,
resolutionPath: 'a-path', resolutionPath: 'a-path',
}; };
const limitedClasses = CENTERED_LIMITED_CONTAINER_CLASSES.split(' ');
function findResolveButton(wrapper) { function findResolveButton(wrapper) {
return wrapper.find('.gl-alert-actions a.gl-button:first-child'); return wrapper.find('.gl-alert-actions a.gl-button:first-child');
...@@ -31,19 +29,6 @@ describe('MergeConflictWarning', () => { ...@@ -31,19 +29,6 @@ describe('MergeConflictWarning', () => {
wrapper.destroy(); wrapper.destroy();
}); });
it.each`
limited | containerClasses
${true} | ${limitedClasses}
${false} | ${[]}
`(
'has the correct container classes when limited is $limited',
({ limited, containerClasses }) => {
createComponent({ limited });
expect(wrapper.classes()).toEqual(containerClasses);
},
);
it.each` it.each`
present | resolutionPath present | resolutionPath
${false} | ${''} ${false} | ${''}
......
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