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:
parent
d76c647797
commit
369bb6fb14
3 changed files with 14 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Fixed merge request fill tree toggling not respecting fluid width preference
|
||||||
|
merge_request:
|
||||||
|
author:
|
||||||
|
type: fixed
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue