-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Feature/cxcds 12248 redesign search spa (#19260)
Co-authored-by: Konrad Dzikowski <[email protected]> Co-authored-by: darvsorceix <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Peter Kurajsky <[email protected]> Co-authored-by: Peter Kurajsky <[email protected]> Co-authored-by: Artur Lasocha <[email protected]>
- Loading branch information
1 parent
121ea4b
commit d9fc090
Showing
16 changed files
with
1,366 additions
and
280 deletions.
There are no files selected for viewing
65 changes: 35 additions & 30 deletions
65
integration-libs/cds/src/recent-searches/recent-searches.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,40 @@ | ||
<ng-container *ngIf="result$ | async as results"> | ||
<ng-container *ngIf="results?.length"> | ||
<div class="message"> | ||
{{ 'cdsRecentSearches.recentSearches' | cxTranslate }} | ||
<div class="recent-searches"> | ||
<h3> | ||
{{ 'cdsRecentSearches.recentSearches' | cxTranslate }} | ||
</h3> | ||
<ul | ||
tabindex="0" | ||
[ariaLabel]="'cdsRecentSearches.ariaRecentSearches' | cxTranslate" | ||
role="listbox" | ||
> | ||
<li *ngFor="let recentSearch of results"> | ||
<a | ||
role="option" | ||
[innerHTML]=" | ||
recentSearch | ||
| cxHighlight: (outletContext$ | async)?.search : false | ||
" | ||
[routerLink]=" | ||
{ | ||
cxRoute: 'search', | ||
params: { query: recentSearch }, | ||
} | cxUrl | ||
" | ||
(mousedown)="$event.preventDefault()" | ||
(keydown.arrowup)="shareEvent($any($event))" | ||
(keydown.arrowdown)="shareEvent($any($event))" | ||
(keydown.arrowleft)="shareEvent($any($event))" | ||
(keydown.arrowright)="shareEvent($any($event))" | ||
(keydown.enter)="shareEvent($any($event))" | ||
(keydown.escape)="shareEvent($any($event))" | ||
(blur)="shareEvent($any($event))" | ||
(click)="updateChosenWord(recentSearch)" | ||
> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
<ul | ||
class="recent-searches" | ||
[ariaLabel]="'cdsRecentSearches.ariaRecentSearches' | cxTranslate" | ||
role="listbox" | ||
> | ||
<li *ngFor="let recentSearch of results"> | ||
<a | ||
role="option" | ||
[innerHTML]=" | ||
recentSearch | cxHighlight: (outletContext$ | async)?.search : false | ||
" | ||
[routerLink]=" | ||
{ | ||
cxRoute: 'search', | ||
params: { query: recentSearch }, | ||
} | cxUrl | ||
" | ||
(mousedown)="$event.preventDefault()" | ||
(keydown.arrowup)="shareEvent($any($event))" | ||
(keydown.arrowdown)="shareEvent($any($event))" | ||
(keydown.enter)="shareEvent($any($event))" | ||
(keydown.escape)="shareEvent($any($event))" | ||
(blur)="shareEvent($any($event))" | ||
(click)="updateChosenWord(recentSearch)" | ||
> | ||
</a> | ||
</li> | ||
</ul> | ||
</ng-container> | ||
</ng-container> |
50 changes: 29 additions & 21 deletions
50
integration-libs/cds/src/trending-searches/trending-searches.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,34 @@ | ||
<ng-container *ngIf="searchPhrases$ | async as searchPhrases"> | ||
<ng-container *ngIf="searchPhrases?.length"> | ||
<div class="message"> | ||
{{ 'cdsTrendingSearches.trendingSearches' | cxTranslate }} | ||
<div class="trending-searches"> | ||
<h3> | ||
{{ 'cdsTrendingSearches.trendingSearches' | cxTranslate }} | ||
</h3> | ||
<ul | ||
tabindex="0" | ||
[ariaLabel]="'cdsTrendingSearches.ariaTrendingSearches' | cxTranslate" | ||
> | ||
<li *ngFor="let phrase of searchPhrases"> | ||
<a | ||
role="option" | ||
[routerLink]=" | ||
{ | ||
cxRoute: 'search', | ||
params: { query: phrase.searchPhrase }, | ||
} | cxUrl | ||
" | ||
(mousedown)="$event.preventDefault()" | ||
(keydown.arrowup)="shareEvent($any($event))" | ||
(keydown.arrowdown)="shareEvent($any($event))" | ||
(keydown.arrowleft)="shareEvent($any($event))" | ||
(keydown.arrowright)="shareEvent($any($event))" | ||
(keydown.enter)="shareEvent($any($event))" | ||
(keydown.escape)="shareEvent($any($event))" | ||
> | ||
{{ phrase.searchPhrase }} | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<ul | ||
class="recent-searches" | ||
[ariaLabel]="'cdsTrendingSearches.ariaTrendingSearches' | cxTranslate" | ||
> | ||
<li *ngFor="let phrase of searchPhrases"> | ||
<a | ||
role="option" | ||
[routerLink]=" | ||
{ | ||
cxRoute: 'search', | ||
params: { query: phrase.searchPhrase }, | ||
} | cxUrl | ||
" | ||
> | ||
{{ phrase.searchPhrase }} | ||
</a> | ||
</li> | ||
</ul> | ||
</ng-container> | ||
</ng-container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.