AAE-22043 Fix long form flow outside container (#10265)

* AAE-22043 Fix long form flow outside container

* AAE-22043 Fix unit test
This commit is contained in:
Diogo Bastos
2024-10-04 11:11:57 +01:00
committed by GitHub
parent 2aa9f5b4be
commit 0e085bc73a
3 changed files with 20 additions and 12 deletions

View File

@@ -36,7 +36,11 @@
</button> </button>
</adf-toolbar> </adf-toolbar>
<mat-card appearance="outlined" [class.adf-cloud-form-content-card]="displayConfiguration?.options?.fullscreen"> <mat-card
appearance="outlined"
class="adf-cloud-form-content-card"
[class.adf-cloud-form-content-card-fullscreen]="displayMode === 'fullScreen'"
>
<div class="adf-cloud-form-content-card-container"> <div class="adf-cloud-form-content-card-container">
<mat-card-header *ngIf="showTitle || showRefreshButton || showValidationIcon"> <mat-card-header *ngIf="showTitle || showRefreshButton || showValidationIcon">
<mat-card-title> <mat-card-title>

View File

@@ -67,18 +67,22 @@
} }
&-content-card { &-content-card {
padding: 0; overflow-y: auto;
height: 100%;
width: 100%;
.adf-cloud-form-content-card-container { &-fullscreen {
display: flex; padding: 0;
flex-direction: column;
height: 100%; height: 100%;
width: 100%;
#{$mat-card-content} { .adf-cloud-form-content-card-container {
display: flex;
flex-direction: column;
height: 100%; height: 100%;
overflow: hidden auto;
#{$mat-card-content} {
height: 100%;
overflow: hidden auto;
}
} }
} }
} }

View File

@@ -1319,7 +1319,7 @@ describe('FormCloudComponent', () => {
}); });
it('should not set the styles for the card', () => { it('should not set the styles for the card', () => {
const fullScreenCard = fixture.debugElement.query(By.css('.adf-cloud-form-content-card')); const fullScreenCard = fixture.debugElement.query(By.css('.adf-cloud-form-content-card-fullscreen'));
expect(fullScreenCard).toBeNull(); expect(fullScreenCard).toBeNull();
}); });
@@ -1405,7 +1405,7 @@ describe('FormCloudComponent', () => {
}); });
it('should set the styles for the card', () => { it('should set the styles for the card', () => {
const fullScreenCard = fixture.debugElement.query(By.css('.adf-cloud-form-content-card')); const fullScreenCard = fixture.debugElement.query(By.css('.adf-cloud-form-content-card-fullscreen'));
expect(fullScreenCard).not.toBeNull(); expect(fullScreenCard).not.toBeNull();
}); });