Skip to content

Commit

Permalink
Fixed SonarCloud complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
VitoAlbano committed Apr 25, 2024
1 parent e62f6e9 commit e4a1630
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
class="adf-search-chip-list-item"
matTooltip="{{ 'SEARCH.FILTER.BUTTONS.CLEAR-ALL.TOOLTIP' | translate }}"
matTooltipPosition="right"
(keyup.enter)="facetFiltersService.resetAllSelectedBuckets()"
(click)="facetFiltersService.resetAllSelectedBuckets()">
{{ 'SEARCH.FILTER.BUTTONS.CLEAR-ALL.LABEL' | translate }}
</mat-chip-option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<ng-container *ngIf="displayCount > 0; else withOutDisplayCount" >
<mat-chip-option
*ngFor="let item of items.slice(0, displayCount)"
(keyup.enter)="clicked()"
(click)="clicked()"
[attr.data-automation-id]="'card-arrayitem-chip-' + item.value">
<mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon>
Expand All @@ -20,6 +21,7 @@
<ng-template #withOutDisplayCount>
<mat-chip-option
*ngFor="let item of items"
(keyup.enter)="clicked()"
(click)="clicked()"
[attr.data-automation-id]="'card-arrayitem-chip-' + item.value">
<mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon>
Expand All @@ -31,7 +33,7 @@
<mat-card appearance="outlined" class="adf-array-item-more-chip-container">
<mat-card-content>
<mat-chip-listbox>
<mat-chip-option (click)="clicked()"
<mat-chip-option (click)="clicked()" (keyup.enter)="clicked()"
*ngFor="let item of items.slice(displayCount, items.length)"
[attr.data-automation-id]="'card-arrayitem-chip-' + item.value">
<mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon>
Expand All @@ -47,6 +49,7 @@
</ng-template>
<button mat-icon-button *ngIf="showClickableIcon"
(click)="clicked()"
(keydown.enter)="clicked()"
class="adf-array-item-action"
[attr.aria-label]="'CORE.METADATA.ACTIONS.EDIT' | translate"
[attr.title]="'CORE.METADATA.ACTIONS.EDIT' | translate"
Expand Down
17 changes: 6 additions & 11 deletions lib/core/src/lib/form/components/form-renderer.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
}
}

.adf-container-widget__header-text, .adf-label {
.adf-container-widget__header-text,
.adf-label {
font-family: var(--theme-font-family);
color: var(--theme-primary-color);
}
Expand Down Expand Up @@ -89,19 +90,13 @@
}
}

#{$mat-form-field} {
width: 100%;
}

mat-form-field {
width: 100%;
}

#{mat-input-placeholder} {
top: 1.8em !important;
top: 1.8em;
}

#{$mat-form-field} {
width: 100%;

label {
transform: scaleX(1);
transition: transform 150ms linear;
Expand Down Expand Up @@ -135,7 +130,7 @@
}

& #{$mat-card-header-text} {
margin: 0 !important;
margin: 0;
}

& #{$mat-tab-body-content} {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

<div data-automation-id="adf-attach-widget-readonly-list">
<mat-list *ngIf="hasFile">
<mat-list-item class="adf-attach-files-row" *ngFor="let file of field.value">
<mat-list-item class="adf-attach-files-row" *ngFor="let file of field.value; index as i">
<img matListItemLine class="adf-attach-widget__icon"
[id]="'file-'+file.id+'-icon'"
[src]="file.content ? getIcon(file.content.mimeType) : getIcon(file.mimeType)"
Expand All @@ -64,9 +64,9 @@
(keyup.enter)="onAttachFileClicked(file)"
role="img"
[attr.aria-label]="file.name"
tabindex="0"/>
[tabindex]="i"/>
<span matLine id="{{'file-'+file.id}}" (click)="onAttachFileClicked(file)" [matTooltip]="file.name" (keyup.enter)="onAttachFileClicked(file)"
tabindex="0" class="adf-file">{{file.name}}</span>
[tabindex]="i" class="adf-file">{{file.name}}</span>
<button id="{{'file-'+file.id+'-option-menu'}}" mat-icon-button [matMenuTriggerFor]="fileActionMenu"
[attr.aria-label]="'ADF_PROCESS_LIST.DETAILS.BUTTON.FILE_OPTION_MENU' | translate">
<mat-icon>more_vert</mat-icon>
Expand Down

0 comments on commit e4a1630

Please sign in to comment.