Skip to content

Commit

Permalink
fix: (CXSPA-1042) - Empty wishlist notification, heading to paragraph…
Browse files Browse the repository at this point in the history
… change (SAP#18866)

Co-authored-by: Piotr Bartkowiak <pbartkowiak@divante.pl>
Co-authored-by: Miguel Estrada <15113219+developpeurweb@users.noreply.github.com>
  • Loading branch information
3 people authored May 28, 2024
1 parent cc0fe68 commit eed52ab
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { RouterModule } from '@angular/router';
import {
AuthGuard,
CmsConfig,
FeaturesConfigModule,
I18nModule,
provideDefaultConfig,
UrlModule,
Expand All @@ -35,6 +36,7 @@ import { WishListComponent } from './wish-list/wish-list.component';
RouterModule,
StarRatingModule,
UrlModule,
FeaturesConfigModule,
],
providers: [
provideDefaultConfig(<CmsConfig>{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,11 @@
</ng-container>

<ng-template #emptyWishList>
<h2>{{ 'wishlist.empty' | cxTranslate }}</h2>
<!-- TODO: (CXSPA-7288) - Remove feature flag next major release -->
<p *cxFeature="'a11yEmptyWishlistHeading'" class="cx-empty-wish-list">
{{ 'wishlist.empty' | cxTranslate }}
</p>
<h2 *cxFeature="'!a11yEmptyWishlistHeading'">
{{ 'wishlist.empty' | cxTranslate }}
</h2>
</ng-template>
4 changes: 4 additions & 0 deletions feature-libs/cart/wish-list/styles/_wish-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
}
}

.cx-empty-wish-list {
text-align: center;
}

@include media-breakpoint-down(md) {
--cx-max-width: 75%;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@ export interface FeatureTogglesInterface {
* will be fully visible
*/
a11yCloseProductImageBtnFocus?: boolean;

/**
* Modifies the template of 'WishListComponent'.
* Empty wishlist notification will be displayed in a paragraph instead of a heading.
*/
a11yEmptyWishlistHeading?: boolean;
}

export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
Expand Down Expand Up @@ -280,4 +286,5 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
a11yTruncatedTextForResponsiveView: false,
a11yMyAccountLinkOutline: false,
a11yCloseProductImageBtnFocus: false,
a11yEmptyWishlistHeading: false,
};
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ if (environment.estimatedDeliveryDate) {
a11yTruncatedTextForResponsiveView: true,
a11yMyAccountLinkOutline: true,
a11yCloseProductImageBtnFocus: true,
a11yEmptyWishlistHeading: true,
};
return appFeatureToggles;
}),
Expand Down

0 comments on commit eed52ab

Please sign in to comment.