[ADF-3734] Fix search filters not wrapping (#3955)

* [ADF-3734] Fix search filters not wrapping

* [ADF-3734] Improve search filter bucket selector
This commit is contained in:
davidcanonieto
2018-11-09 12:34:59 +00:00
committed by Eugenio Romano
parent e88690ad76
commit f4cb3ac6a9
8 changed files with 87 additions and 9 deletions

View File

@@ -3,7 +3,7 @@
</div> </div>
<div class="adf-search-results"> <div class="adf-search-results">
<adf-search-filter #searchFilter></adf-search-filter> <adf-search-filter class="adf-search-settings" #searchFilter></adf-search-filter>
<div class="adf-search-results__content"> <div class="adf-search-results__content">
<mat-progress-bar *ngIf="isLoading" color="primary" mode="indeterminate"></mat-progress-bar> <mat-progress-bar *ngIf="isLoading" color="primary" mode="indeterminate"></mat-progress-bar>

View File

@@ -119,7 +119,7 @@ export class SearchCheckListPage {
let bucketNumber = fileTypeFilter.getText().then((valueOfBucket) => { let bucketNumber = fileTypeFilter.getText().then((valueOfBucket) => {
let numberOfBucket = valueOfBucket.split('(')[1]; let numberOfBucket = valueOfBucket.split('(')[1];
let totalNumberOfBucket = numberOfBucket.split(')')[0]; let totalNumberOfBucket = numberOfBucket.split(')')[0];
return totalNumberOfBucket; return totalNumberOfBucket.trim();
}); });
return bucketNumber; return bucketNumber;

View File

@@ -3,8 +3,15 @@
*ngFor="let option of options" *ngFor="let option of options"
[checked]="option.checked" [checked]="option.checked"
[attr.data-automation-id]="'checkbox-' + (option.name)" [attr.data-automation-id]="'checkbox-' + (option.name)"
(change)="changeHandler($event, option)"> (change)="changeHandler($event, option)"
{{ option.name | translate }} class="facet-filter">
<div
matTooltip="{{ option.name | translate }}"
matTooltipPosition="right"
class="facet-name">
{{ option.name | translate }}
</div>
</mat-checkbox> </mat-checkbox>
</div> </div>

View File

@@ -1,4 +1,22 @@
.adf-search-check-list { .adf-search-check-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.facet-filter {
.mat-checkbox-label {
text-overflow: ellipsis;
overflow: hidden;
width: 100%;
}
.mat-checkbox-layout {
width: 100%;
}
.facet-name {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
} }

View File

@@ -41,7 +41,12 @@
[checked]="query.checked" [checked]="query.checked"
[attr.data-automation-id]="'checkbox-'+facetQueriesLabel+'-'+query.label" [attr.data-automation-id]="'checkbox-'+facetQueriesLabel+'-'+query.label"
(change)="onToggleFacetQuery($event, query)"> (change)="onToggleFacetQuery($event, query)">
{{ query.label | translate }} ({{ query.count }}) <div
matTooltip="{{ query.label | translate }} ({{ query.count }})"
matTooltipPosition="right"
class="facet-label">
{{ query.label | translate }} ({{ query.count }})
</div>
</mat-checkbox> </mat-checkbox>
</ng-container> </ng-container>
</div> </div>
@@ -96,7 +101,15 @@
[checked]="bucket.checked" [checked]="bucket.checked"
[attr.data-automation-id]="'checkbox-'+field.label+'-'+(bucket.display || bucket.label)" [attr.data-automation-id]="'checkbox-'+field.label+'-'+(bucket.display || bucket.label)"
(change)="onToggleBucket($event, field, bucket)"> (change)="onToggleBucket($event, field, bucket)">
{{ bucket.display || bucket.label | translate }} <span *ngIf="bucket.count!==null">(</span>{{ bucket.count }}<span *ngIf="bucket.count!==null">)</span> <div
matTooltip="{{ bucket.display || bucket.label | translate }}"
matTooltipPosition="right"
class="facet-label">
{{ bucket.display || bucket.label | translate }}
<span *ngIf="bucket.count!==null">(</span>
{{ bucket.count }}
<span *ngIf="bucket.count!==null">)</span>
</div>
</mat-checkbox> </mat-checkbox>
</div> </div>

View File

@@ -4,6 +4,22 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.mat-checkbox-label {
text-overflow: ellipsis;
overflow: hidden;
width: 100%;
}
.mat-checkbox-layout {
width: 100%;
}
.facet-label {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.mat-checkbox { .mat-checkbox {
margin: 5px; margin: 5px;

View File

@@ -3,8 +3,14 @@
(change)="changeHandler($event)"> (change)="changeHandler($event)">
<mat-radio-button <mat-radio-button
*ngFor="let option of options" *ngFor="let option of options"
[value]="option.value"> [value]="option.value"
{{ option.name | translate }} class="facet-filter">
<div
matTooltip="{{ option.name | translate }}"
matTooltipPosition="right"
class="filter-label">
{{ option.name | translate }}
</div>
</mat-radio-button> </mat-radio-button>
</mat-radio-group> </mat-radio-group>

View File

@@ -1,10 +1,28 @@
.adf-search-radio { .adf-search-radio {
.mat-radio-group { .mat-radio-group {
display: inline-flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.mat-radio-button { .mat-radio-button {
margin: 5px; margin: 5px;
} }
.facet-filter {
.mat-radio-label-content {
text-overflow: ellipsis;
overflow: hidden;
width: 100%;
}
.mat-radio-label {
width: 100%;
}
.filter-label {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
} }