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

Feature/cxcds 12248 redesign search spa #19260

Merged
merged 119 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
d68aa4f
Add Trending Searches to search box component
c5346163 Apr 16, 2024
cb7f016
Improve code quality
c5346163 Apr 17, 2024
48c9e21
Merge branch 'develop' of https://github.com/SAP/spartacus into CXCDS…
c5346163 Apr 17, 2024
126c8c9
Remove feature references from the search box module
c5346163 Apr 17, 2024
446657a
Merge branch 'develop' into CXCDS-11272
darvsorceix Apr 18, 2024
b6320e6
Update unit tests
c5346163 Apr 22, 2024
3222d19
Merge branch 'develop' into CXCDS-11272
darvsorceix Apr 22, 2024
0510e67
Apply prettier
c5346163 Apr 22, 2024
d904ba0
Merge branch 'develop' into CXCDS-11272
darvsorceix Apr 25, 2024
21d096c
Update code structure
c5346163 Apr 25, 2024
862ccbf
Add license header
github-actions[bot] Apr 25, 2024
b8bb3db
Merge branch 'develop' into CXCDS-11272
darvsorceix Apr 25, 2024
8230189
Add unit tests for trending searches component and service, restructu…
c5346163 Apr 26, 2024
c7950d9
Remove hardcoded product link
c5346163 Apr 29, 2024
942cf83
Merge branch 'develop' into CXCDS-11272
darvsorceix Apr 29, 2024
6cae650
CXCDS-11272 - UX design improvements applied
pekura May 2, 2024
fee6155
CXCDS-11272 - feature toggle added to interface; default values added
pekura May 2, 2024
3c78eb0
Merge branch 'develop' into CXCDS-11272
pekura May 2, 2024
2afd93c
CXCDS-11272 - UX design minor improvement applied
pekura May 23, 2024
32dec59
Merge branch 'develop' into CXCDS-11272
pekura Jun 3, 2024
72a6069
Merge branch 'develop' into CXCDS-11272
pekura Jun 3, 2024
960b225
CXCDS-12248 first look
lasoh1985 Aug 8, 2024
0346045
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
lasoh1985 Aug 8, 2024
2b68390
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
lasoh1985 Sep 2, 2024
243b901
CXCDS-12248 keybord navigation
lasoh1985 Sep 12, 2024
28f20bf
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
lasoh1985 Sep 12, 2024
938d0cd
CXCDS-12248 keybord navigation => carouel stopPropagation
lasoh1985 Sep 12, 2024
9b07acc
Merge branch 'develop' into CXCDS-11272
pekura Sep 15, 2024
2eb53ac
feat: CXCDS-12079 Improve searchBox handling for Trending Searches in…
darvsorceix Sep 15, 2024
021b277
Cxcds 12079 (#19242)
pekura Sep 15, 2024
3f7fbf7
CXCDS-11272 - prettier
pekura Sep 15, 2024
1bb4f79
Merge branch 'CXCDS-11272' into feature/CXCDS-12248-redesign-search-spa
pekura Sep 15, 2024
0988197
Merge branch 'develop' into CXCDS-11272
pekura Sep 16, 2024
195658f
CXCDS-12248 add Trending-searches
lasoh1985 Sep 17, 2024
cfb9d60
Merge branch 'develop' into CXCDS-11272
pekura Sep 17, 2024
9a66aa0
Merge branch 'CXCDS-11272' into feature/CXCDS-12248-redesign-search-spa
pekura Sep 17, 2024
08e24e2
CXCDS-12248 - disable trending searc hes FT by deafult
pekura Sep 17, 2024
f51f9f6
Update search-box.component.ts
pekura Sep 17, 2024
e6137ec
CXCDS-11272 - trending searches should only be visible for empty sear…
pekura Sep 18, 2024
a81b594
Merge branch 'CXCDS-11272' into feature/CXCDS-12248-redesign-search-spa
pekura Sep 18, 2024
ee50012
CXCDS-12248 fix redirectKeywords behaviors
lasoh1985 Sep 18, 2024
26c915b
CXCDS-11272 -prettier fix
pekura Sep 18, 2024
4caec3f
Merge branch 'CXCDS-11272' into feature/CXCDS-12248-redesign-search-spa
pekura Sep 18, 2024
02fcbc5
Merge branch 'develop' into CXCDS-11272
pekura Sep 18, 2024
f1a2467
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
lasoh1985 Sep 18, 2024
d4434c4
Merge branch 'develop' into CXCDS-11272
pekura Sep 18, 2024
a068cc9
Merge branch 'CXCDS-11272' into feature/CXCDS-12248-redesign-search-spa
pekura Sep 18, 2024
dc38fec
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
lasoh1985 Sep 24, 2024
e328f7a
CXCDS-12248 fix and add some tests
lasoh1985 Sep 24, 2024
1a0106b
Merge branch 'develop' into CXCDS-11272
pekura Sep 25, 2024
a60873c
prettier fix
pekura Sep 25, 2024
9e6e098
Merge branch 'CXCDS-11272' into feature/CXCDS-12248-redesign-search-spa
pekura Sep 25, 2024
5e5b7d8
prettier fix
pekura Sep 25, 2024
7dcd8cf
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
lasoh1985 Sep 25, 2024
41352cc
Merge remote-tracking branch 'origin/feature/CXCDS-12248-redesign-sea…
lasoh1985 Sep 25, 2024
6326bbc
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
lasoh1985 Sep 25, 2024
4428085
Merge branch 'develop' into CXCDS-11272
pekura Sep 25, 2024
4887234
Merge branch 'CXCDS-11272' into feature/CXCDS-12248-redesign-search-spa
pekura Sep 25, 2024
8fee93a
CCDS-12248 fix search appearance/behaviors
lasoh1985 Sep 25, 2024
d27843b
Merge branch 'feature/CXCDS-12248-redesign-search-spa' of https://git…
pekura Sep 25, 2024
fe1f18e
CXCDS-11272 - CDS Site ID fix
pekura Sep 25, 2024
3944ac1
Merge branch 'CXCDS-11272' into feature/CXCDS-12248-redesign-search-spa
pekura Sep 25, 2024
39b80b6
Merge branch 'develop' into CXCDS-11272
pekura Sep 26, 2024
f4ce3c5
CXCDS-11272 - trending searches service lifecycle improvements
pekura Sep 26, 2024
ed87bca
Merge branch 'CXCDS-11272' into feature/CXCDS-12248-redesign-search-spa
pekura Sep 26, 2024
3b6da9d
CCDS-12248 fix search with empty phrase on click
lasoh1985 Sep 26, 2024
ff8839d
CXCDS-11272 - using v1 API endpoint for trending searches
pekura Sep 26, 2024
9984df2
Merge branch 'CXCDS-11272' into feature/CXCDS-12248-redesign-search-spa
pekura Sep 26, 2024
981b77d
CCDS-12248 UX improvements
lasoh1985 Oct 1, 2024
136ba7a
Merge branch 'develop' of https://github.com/SAP/spartacus into CXCDS…
c5346163 Oct 3, 2024
2f83f21
Code review improvements
c5346163 Oct 3, 2024
ba81245
Re-trigger build
c5346163 Oct 3, 2024
73c3975
Update unit tests
c5346163 Oct 3, 2024
13b2563
Prettier code style
c5346163 Oct 3, 2024
21b9819
Merge branch 'develop' of https://github.com/SAP/spartacus into CXCDS…
c5346163 Oct 3, 2024
c69c2a5
Update unit tests again
c5346163 Oct 4, 2024
9c6799b
Remove unnecessary hook
c5346163 Oct 4, 2024
64f7eaa
Remove console log error
c5346163 Oct 4, 2024
8673b46
Change changeDetection to onPush for TrendingSearches component
c5346163 Oct 4, 2024
d8b5c0b
Merge branch 'develop' into CXCDS-11272
pekura Oct 7, 2024
8eac843
Merge branch 'CXCDS-11272' into feature/CXCDS-12248-redesign-search-spa
lasoh1985 Oct 7, 2024
0b216ae
CCDS-12248 fix review comments
lasoh1985 Oct 7, 2024
7f6078d
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
lasoh1985 Oct 7, 2024
4fddc3d
CCDS-12248 fix CI
lasoh1985 Oct 7, 2024
11263f3
CXCDS-12248 - css cleanup & backwards compatibility
pekura Oct 7, 2024
16bad50
CXCDS-12248 - fixed a typo and a type error
pekura Oct 7, 2024
1eb8d5f
CXCDS-12248 - prettier fix
pekura Oct 7, 2024
30ee0fd
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
pekura Oct 7, 2024
5362b26
CXCDS-12248 new UX improvements
lasoh1985 Oct 7, 2024
e8b783d
CXCDS-12248 fix Sonar
lasoh1985 Oct 7, 2024
c12e319
ux improvements
lasoh1985 Oct 8, 2024
1370965
ux improvements
lasoh1985 Oct 9, 2024
1ecf4fc
ux improvements
lasoh1985 Oct 9, 2024
59be5f1
ux improvements
lasoh1985 Oct 9, 2024
ac94bf2
CXCDS-12248 - prettier fix; narrow screen rendering improvements
pekura Oct 9, 2024
c486014
list padding, remocve underline suggestions, remove border botom reco…
lasoh1985 Oct 9, 2024
8fe5456
fix header when !result.message
lasoh1985 Oct 9, 2024
c6fdf3d
fix headers + tests
lasoh1985 Oct 10, 2024
c320abb
fix padding mobile list element
lasoh1985 Oct 10, 2024
5b219d3
fix padding-right (property-disallowed-list) error
lasoh1985 Oct 10, 2024
16b6a7f
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
lasoh1985 Oct 10, 2024
4afa0cb
CXCDS-12248 fix build
lasoh1985 Oct 10, 2024
05a8d93
CXCDS-12248 - prettier fix
pekura Oct 10, 2024
17f98e2
CXCDS-12248 - revert page width css variable
pekura Oct 10, 2024
9f9b408
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
pekura Oct 10, 2024
e9f56dd
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
pekura Oct 10, 2024
bb4438c
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
pekura Oct 10, 2024
2e26a80
CXCDS-12248 - search section headers handling backwards compatibility…
pekura Oct 11, 2024
8af8197
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
pekura Oct 11, 2024
3f4ac0c
fix comments PR
lasoh1985 Oct 11, 2024
72433ff
fix comments PR
lasoh1985 Oct 11, 2024
7b3b1f7
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
lasoh1985 Oct 15, 2024
71edc93
Trigger Build
pekura Oct 15, 2024
5053951
Trigger Build
pekura Oct 15, 2024
791b23e
CXCDS-12248 - fixed focus behaviour on search box close
pekura Oct 15, 2024
1c7d524
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
pekura Oct 15, 2024
db519e9
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
pekura Oct 15, 2024
f8bc4f0
Trigger Build
pekura Oct 15, 2024
f0a0acb
Merge branch 'develop' into feature/CXCDS-12248-redesign-search-spa
lasoh Oct 16, 2024
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,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>
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>
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,11 @@ export class TrendingSearchesComponent implements OnInit {
get contextObservable() {
return this.outletContext?.context$ ?? EMPTY;
}

shareEvent(event: KeyboardEvent) {
if (!event) {
throw new Error('Missing Event');
}
this.searchBoxComponentService.shareEvent(event);
}
}
3 changes: 2 additions & 1 deletion projects/assets/src/translations/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
"noMatch": "We could not find any results",
"exactMatch": "{{ term }}",
"empty": "Ask us anything"
}
},
"closeSearchPanel": "Close"
},
"sorting": {
"date": "Date",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ export interface FeatureTogglesInterface {
*/
showSearchingCustomerByOrderInASM?: boolean;

/**
* New REDESIGNED search-box component
*/
searchBoxV2?: boolean;

/**
* Some Changes for input of cart Number and text of Customer360View in ASM view
*/
Expand Down Expand Up @@ -638,6 +643,7 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
showBillingAddressInDigitalPayments: false,
showDownloadProposalButton: false,
showPromotionsInPDP: true,
searchBoxV2: false,
recentSearches: true,
trendingSearches: false,
pdfInvoicesSortByInvoiceDate: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ if (environment.cpq) {
showBillingAddressInDigitalPayments: false,
showDownloadProposalButton: false,
showPromotionsInPDP: false,
searchBoxV2: false,
recentSearches: true,
trendingSearches: false,
pdfInvoicesSortByInvoiceDate: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

export enum SearchBoxFeatures {
SEARCH_BOX_V2 = 'searchBoxV2',
RECENT_SEARCHES_FEATURE = 'recentSearches',
TRENDING_SEARCHES_FEATURE = 'trendingSearches',
}
Loading
Loading