Skip to content

Commit

Permalink
[ACS-7999] Fix inputs for edit and create folder (#9713)
Browse files Browse the repository at this point in the history
* ACS-7999 Fix inputs for edit and create folder

* ACS-7999 Fix jumping dialog when focus field
  • Loading branch information
AleksanderSklorz authored and VitoAlbano committed Jul 9, 2024
1 parent 5b3bc58 commit d797cf3
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/content-services/src/lib/dialogs/folder.dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ <h2 data-automation-id="adf-folder-dialog-title" class="adf-folder-dialog-title"

<mat-dialog-content class="adf-folder-dialog-content">
<form [formGroup]="form" (submit)="submit()">
<mat-form-field class="adf-full-width" appearance="outline">
<mat-form-field class="adf-full-width">
<mat-label>{{ 'CORE.FOLDER_DIALOG.FOLDER_NAME.LABEL' | translate }}</mat-label>
<input
id="adf-folder-name-input"
Expand All @@ -26,7 +26,7 @@ <h2 data-automation-id="adf-folder-dialog-title" class="adf-folder-dialog-title"
</mat-hint>
</mat-form-field>

<mat-form-field class="adf-full-width" appearance="outline">
<mat-form-field class="adf-full-width">
<mat-label>{{ 'CORE.FOLDER_DIALOG.FOLDER_TITLE.LABEL' | translate }}</mat-label>
<input
id="adf-folder-title-input"
Expand All @@ -36,7 +36,7 @@ <h2 data-automation-id="adf-folder-dialog-title" class="adf-folder-dialog-title"
/>
</mat-form-field>

<mat-form-field class="adf-full-width" appearance="outline">
<mat-form-field class="adf-full-width">
<mat-label>{{ 'CORE.FOLDER_DIALOG.FOLDER_DESCRIPTION.LABEL' | translate }}</mat-label>
<textarea
id="adf-folder-description-input"
Expand Down
23 changes: 23 additions & 0 deletions lib/content-services/src/lib/dialogs/folder.dialog.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
@import 'styles/mat-selectors';

.adf-folder-dialog {
.adf-folder-dialog-content {
padding: 0;
overflow: unset;

#{$mat-form-field-infix} {
padding-bottom: 3.5px;
}

#{$mat-form-field-hide-placeholder} {
#{$mat-floating-label} {
padding-top: 11px;
}
}

#{$mat-form-field-hint-wrapper} {
padding-left: 0;
margin-left: -2px;
color: var(--adf-theme-foreground-secondary-text-color);
font-size: 10.5px;
}
}

.adf-folder-dialog-title {
display: inline-flex;
}
}

Expand Down
2 changes: 2 additions & 0 deletions lib/core/src/lib/styles/_mat-selectors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ $mat-slide-toggle: '.mat-mdc-slide-toggle';
$mat-list-item-unscoped-content: '.mat-mdc-list-item-unscoped-content';
$mat-text-field--no-label: '.mdc-text-field--no-label';
$mat-form-field-infix: '.mat-mdc-form-field-infix';
$mat-form-field-hide-placeholder: '.mat-form-field-hide-placeholder';
$mat-form-field-hint-wrapper: '.mat-mdc-form-field-hint-wrapper';
$mat-checkbox-background: '.mdc-checkbox__background';
$mat-dialog-content: '.mdc-dialog__content';
$mat-floating-label: '.mdc-floating-label';
Expand Down

0 comments on commit d797cf3

Please sign in to comment.