-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ACS-5266] Advanced Search - New component for Category facet #8764
Changes from all commits
49003d9
bce20f9
93d73a8
be3e075
e9a6b9f
7b9943a
42f1b95
de843fe
2d5bb47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,14 @@ | |
class="adf-option-chips" | ||
*ngFor="let option of selectedOptions" | ||
(removed)="remove(option)"> | ||
<span>{{option}}</span> | ||
<button matChipRemove class="adf-option-chips-delete-button" [attr.aria-label]="('SEARCH.FILTER.BUTTONS.REMOVE' | translate) + ' ' + option"> | ||
<span [matTooltip]="'SEARCH.RESULTS.WILL_CONTAIN' | translate:{searchTerm: option.fullPath}" | ||
[matTooltipDisabled]="!option.fullPath" [matTooltipShowDelay]="tooltipShowDelay"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need to consider if we want to display tooltip when there is only There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought about it as well, not sure if we need tooltips for other filters though. In the ticket for Tags & Location, there is no info about tooltips. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes but after we release this, customers might use this component to define filters on some custom properties as well and we can't predict if they will contain longer values. But on the other hand they can always use the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added tooltips for autocomplete in case of long values as long values shrink there, for chips we need tooltips only for Categories to show the full path. |
||
{{ option.value }} | ||
</span> | ||
<button matChipRemove class="adf-option-chips-delete-button" [matTooltipDisabled]="!option.fullPath" | ||
[matTooltip]="('SEARCH.FILTER.BUTTONS.REMOVE' | translate) + ' \'' + option.fullPath + '\''" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here for tooltip |
||
[matTooltipShowDelay]="tooltipShowDelay" | ||
[attr.aria-label]="('SEARCH.FILTER.BUTTONS.REMOVE' | translate) + ' ' + option.value"> | ||
<mat-icon class="adf-option-chips-delete-icon">close</mat-icon> | ||
</button> | ||
</mat-chip> | ||
|
@@ -24,9 +30,15 @@ | |
</mat-chip-list> | ||
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selected($event)" id="adf-search-chip-autocomplete" | ||
(optionActivated)="activeAnyOption = true" (closed)="activeAnyOption = false"> | ||
<mat-option [disabled]="option | adfIsIncluded: selectedOptions : compareOption" *ngFor="let option of filteredOptions$ | async" | ||
[ngClass]="(option | adfIsIncluded: selectedOptions : compareOption) && 'adf-autocomplete-added-option'"> | ||
{{option}} | ||
</mat-option> | ||
<ng-container *ngIf="optionInput.value.length > 0"> | ||
<mat-option | ||
[disabled]="option | adfIsIncluded: selectedOptions : compareOption" | ||
*ngFor="let option of filteredOptions" [value]="option" [matTooltipShowDelay]="tooltipShowDelay" | ||
[matTooltipDisabled]="!option.fullPath" matTooltipPosition="right" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same for tooltip |
||
[matTooltip]="'SEARCH.RESULTS.WILL_CONTAIN' | translate:{searchTerm: option.fullPath || option.value}" | ||
[ngClass]="(option | adfIsIncluded: selectedOptions : compareOption) && 'adf-autocomplete-added-option'"> | ||
{{ option.fullPath || option.value }} | ||
</mat-option> | ||
</ng-container> | ||
</mat-autocomplete> | ||
</mat-form-field> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should take
fullPath
and if it's not present it should displayvalue