Fixed merge request fill tree not respecting fluid width

This fixes a bug where the merge request fill tree
would not respect the users fluid width preference.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52916
This commit is contained in:
Phil Hughes 2018-10-19 10:37:42 +01:00
parent d76c647797
commit 369bb6fb14
No known key found for this signature in database
GPG Key ID: 32245528C52E0F9F
3 changed files with 14 additions and 1 deletions

View File

@ -419,7 +419,7 @@ export default class MergeRequestTabs {
if (this.diffViewType() === 'parallel' || removeLimited) {
$wrapper.removeClass('container-limited');
} else {
$wrapper.addClass('container-limited');
$wrapper.toggleClass('container-limited', this.fixedLayoutPref);
}
}

View File

@ -0,0 +1,5 @@
---
title: Fixed merge request fill tree toggling not respecting fluid width preference
merge_request:
author:
type: fixed

View File

@ -224,6 +224,14 @@ describe('MergeRequestTabs', function() {
expect($('.content-wrapper')).not.toContainElement('.container-limited');
});
it('does not add container-limited when fluid layout is prefered', function() {
$('.content-wrapper .container-fluid').removeClass('container-limited');
this.class.expandViewContainer(false);
expect($('.content-wrapper')).not.toContainElement('.container-limited');
});
it('does remove container-limited from breadcrumbs', function() {
$('.container-limited').addClass('breadcrumbs');
this.class.expandViewContainer();