Skip to content
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

Multiline selected facet badge on search page #2675

Merged
merged 6 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<a class="badge badge-primary mr-1 mb-1"
<a class="badge badge-primary mb-1"
[attr.aria-label]="'search.filters.remove' | translate:{ type: ('search.filters.applied.' + key) | translate, value: normalizeFilterValue(value) }"
[routerLink]="searchLink"
[queryParams]="(removeParameters | async)" queryParamsHandling="merge">
{{('search.filters.applied.' + key) | translate}}: {{'search.filters.' + filterName + '.' + value | translate: {default: normalizeFilterValue(value)} }}
<span aria-hidden="true"> ×</span>
<span class="d-flex">
<span class="flex-grow-1 text-left">{{('search.filters.applied.' + key) | translate}}: {{'search.filters.' + filterName + '.' + value | translate: {default: normalizeFilterValue(value)} }}</span>
<span class="pl-1" aria-hidden="true">×</span>
</span>
</a>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.badge {
white-space: inherit;
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { stripOperatorFromFilterValue } from '../../search.utils';
@Component({
selector: 'ds-search-label',
templateUrl: './search-label.component.html',
styleUrls: ['./search-label.component.scss'],
standalone: true,
imports: [RouterLink, AsyncPipe, TranslateModule],
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
:host {
line-height: 1;
}
.labels {
margin: 0 calc(-1 * var(--bs-spacer)/8);
ds-search-label {
display: inline-block;
padding: 0 calc(var(--bs-spacer)/8);
}
}
}
4 changes: 2 additions & 2 deletions src/app/shared/search/search.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
[inPlaceSearch]="inPlaceSearch"
[searchPlaceholder]="searchFormPlaceholder | translate">
</ds-themed-search-form>
<div class="row mb-3 mb-md-1">
<div class="labels col-sm-9">
<div class="mb-3 mb-md-1">
<div class="labels">
<ds-search-labels [inPlaceSearch]="inPlaceSearch"></ds-search-labels>
</div>
</div>
Expand Down
Loading