Commit 369bb6fb authored by Phil Hughes's avatar Phil Hughes

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
parent d76c6477
...@@ -419,7 +419,7 @@ export default class MergeRequestTabs { ...@@ -419,7 +419,7 @@ export default class MergeRequestTabs {
if (this.diffViewType() === 'parallel' || removeLimited) { if (this.diffViewType() === 'parallel' || removeLimited) {
$wrapper.removeClass('container-limited'); $wrapper.removeClass('container-limited');
} else { } else {
$wrapper.addClass('container-limited'); $wrapper.toggleClass('container-limited', this.fixedLayoutPref);
} }
} }
......
---
title: Fixed merge request fill tree toggling not respecting fluid width preference
merge_request:
author:
type: fixed
...@@ -224,6 +224,14 @@ describe('MergeRequestTabs', function() { ...@@ -224,6 +224,14 @@ describe('MergeRequestTabs', function() {
expect($('.content-wrapper')).not.toContainElement('.container-limited'); 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() { it('does remove container-limited from breadcrumbs', function() {
$('.container-limited').addClass('breadcrumbs'); $('.container-limited').addClass('breadcrumbs');
this.class.expandViewContainer(); this.class.expandViewContainer();
......
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