diff options
author | Phil Hughes <me@iamphill.com> | 2019-04-12 09:32:05 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-04-12 09:32:05 +0100 |
commit | 45ef6fd77710b29dc3fb1d413eb819ad47f154e5 (patch) | |
tree | 8e9dd1621c81708c7a8511a434274ee27a1edb7d /app | |
parent | 39aa68b20c112192fe3aa130a72a004a379a080a (diff) | |
download | gitlab-ce-45ef6fd77710b29dc3fb1d413eb819ad47f154e5.tar.gz |
Fixed fluid layout preference not being respected in diffs
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52916
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/diffs/components/app.vue | 7 | ||||
-rw-r--r-- | app/assets/javascripts/diffs/index.js | 2 | ||||
-rw-r--r-- | app/views/projects/merge_requests/show.html.haml | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue index 5e74998579b..0ed4dcdcd81 100644 --- a/app/assets/javascripts/diffs/components/app.vue +++ b/app/assets/javascripts/diffs/components/app.vue @@ -64,6 +64,11 @@ export default { required: false, default: '', }, + isFluidLayout: { + type: Boolean, + required: false, + default: false, + }, }, data() { const treeWidth = @@ -116,7 +121,7 @@ export default { return this.treeWidth <= TREE_HIDE_STATS_WIDTH; }, isLimitedContainer() { - return !this.showTreeList && !this.isParallelView; + return !this.showTreeList && !this.isParallelView && !this.isFluidLayout; }, }, watch: { diff --git a/app/assets/javascripts/diffs/index.js b/app/assets/javascripts/diffs/index.js index 63954d9d412..1d897bca1dd 100644 --- a/app/assets/javascripts/diffs/index.js +++ b/app/assets/javascripts/diffs/index.js @@ -71,6 +71,7 @@ export default function initDiffsApp(store) { helpPagePath: dataset.helpPagePath, currentUser: JSON.parse(dataset.currentUserData) || {}, changesEmptyStateIllustration: dataset.changesEmptyStateIllustration, + isFluidLayout: parseBoolean(dataset.isFluidLayout), }; }, computed: { @@ -97,6 +98,7 @@ export default function initDiffsApp(store) { helpPagePath: this.helpPagePath, shouldShow: this.activeTab === 'diffs', changesEmptyStateIllustration: this.changesEmptyStateIllustration, + isFluidLayout: this.isFluidLayout, }, }); }, diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 5111c9fab8d..79c586eef73 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -82,7 +82,8 @@ help_page_path: suggest_changes_help_path, current_user_data: UserSerializer.new(project: @project).represent(current_user, {}, MergeRequestUserEntity).to_json, project_path: project_path(@merge_request.project), - changes_empty_state_illustration: image_path('illustrations/merge_request_changes_empty.svg') } } + changes_empty_state_illustration: image_path('illustrations/merge_request_changes_empty.svg'), + is_fluid_layout: fluid_layout.to_s } } .mr-loading-status = spinner |