[ACS-6078] Fixed layout for create from template component (#3467)

* ACS-6078 Fixed layout for create from template component

* ACS-6078 Added selector

* ACS-6078 Custom class instead of mat class

* ACS-6078 Used component selector

* ACS-6078 Removed unused styles

* ACS-6078 Fixed e2e

* ACS-6078 Empty commit
This commit is contained in:
AleksanderSklorz 2023-10-12 08:19:22 +02:00 committed by GitHub
parent 102b62207f
commit bc98af0968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 14 deletions

View File

@ -1,7 +1,7 @@
<h2 mat-dialog-title [innerHTML]="title"></h2> <h2 mat-dialog-title [innerHTML]="title"></h2>
<div mat-dialog-content> <div mat-dialog-content>
<form [formGroup]="form" novalidate> <form [formGroup]="form" novalidate>
<mat-form-field class="adf-full-width"> <mat-form-field class="app-create-from-template-field">
<input <input
cdkFocusInitial cdkFocusInitial
placeholder="{{ 'NODE_FROM_TEMPLATE.FORM.PLACEHOLDER.NAME' | translate }}" placeholder="{{ 'NODE_FROM_TEMPLATE.FORM.PLACEHOLDER.NAME' | translate }}"
@ -15,7 +15,7 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field class="adf-full-width"> <mat-form-field class="app-create-from-template-field">
<input <input
placeholder="{{ 'NODE_FROM_TEMPLATE.FORM.PLACEHOLDER.TITLE' | translate }}" placeholder="{{ 'NODE_FROM_TEMPLATE.FORM.PLACEHOLDER.TITLE' | translate }}"
matInput matInput
@ -27,7 +27,7 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field class="adf-full-width"> <mat-form-field class="app-create-from-template-field">
<textarea <textarea
matInput matInput
placeholder="{{ 'NODE_FROM_TEMPLATE.FORM.PLACEHOLDER.DESCRIPTION' | translate }}" placeholder="{{ 'NODE_FROM_TEMPLATE.FORM.PLACEHOLDER.DESCRIPTION' | translate }}"

View File

@ -1,7 +1,8 @@
.aca-create-from-template-dialog { app-create-from-template-dialog {
ng-component { overflow: visible;
overflow: visible; display: block;
} margin-left: -24px;
margin-right: -24px;
.mat-dialog-title { .mat-dialog-title {
margin-left: 24px; margin-left: 24px;
@ -21,13 +22,12 @@
} }
} }
.mat-form-field { .app-create-from-template-field {
margin-bottom: 20px; width: 100%;
}
.mat-dialog-container { &:not(:last-of-type) {
padding-left: 0; margin-bottom: 20px;
padding-right: 0; }
} }
.mat-dialog-content { .mat-dialog-content {

View File

@ -40,6 +40,7 @@ import { MatButtonModule } from '@angular/material/button';
imports: [CommonModule, TranslateModule, MatDialogModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, MatButtonModule], imports: [CommonModule, TranslateModule, MatDialogModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, MatButtonModule],
templateUrl: './create-from-template.dialog.html', templateUrl: './create-from-template.dialog.html',
styleUrls: ['./create-from-template.dialog.scss'], styleUrls: ['./create-from-template.dialog.scss'],
selector: 'app-create-from-template-dialog',
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class CreateFromTemplateDialogComponent implements OnInit { export class CreateFromTemplateDialogComponent implements OnInit {

View File

@ -27,7 +27,7 @@ import { BaseComponent } from '../base.component';
import { timeouts } from '../../../utils'; import { timeouts } from '../../../utils';
export class CreateFromTemplateDialogComponent extends BaseComponent { export class CreateFromTemplateDialogComponent extends BaseComponent {
private static rootElement = 'ng-component'; private static rootElement = 'app-create-from-template-dialog';
constructor(page: Page) { constructor(page: Page) {
super(page, CreateFromTemplateDialogComponent.rootElement); super(page, CreateFromTemplateDialogComponent.rootElement);