Skip to content

Commit

Permalink
Merge branch 'develop' into hotfix/CXSPA-1128
Browse files Browse the repository at this point in the history
  • Loading branch information
giancorderoortiz authored Oct 18, 2024
2 parents 3101cc3 + 1499ec5 commit 96ce03e
Show file tree
Hide file tree
Showing 43 changed files with 1,151 additions and 159 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
*ngIf="hasStock"
[max]="maxQuantity"
[control]="addToCartForm.get('quantity')"
[ariaDescribedById]="'add-to-card-stock-info'"
></cx-item-counter>

<span class="info">
<span class="info" id="add-to-card-stock-info">
<span *ngIf="showInventory$ | async">{{ getInventory() }}</span>
{{
hasStock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<button
type="button"
class="close"
title="{{ 'common.close' | cxTranslate }}"
attr.aria-label="{{ 'addToCart.closeModal' | cxTranslate }}"
(click)="dismissModal('Cross click')"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
>*</abbr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<!-- TODO: (CXSPA-5953) Remove feature flags next major -->
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
>*</abbr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@
>{{ 'savedCartDialog.savedCartName' | cxTranslate }}
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
>*</abbr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,12 @@
<ng-container *ngIf="countries$ | async as countries">
<div *ngIf="countries.length !== 0">
<label>
<span class="label-content required">{{
'addressForm.country' | cxTranslate
}}</span>
<span class="label-content required">
{{ 'addressForm.country' | cxTranslate }}
<ng-template
[ngTemplateOutlet]="requiredAsterisk"
></ng-template>
</span>
<ng-select
[inputAttrs]="{ required: 'true' }"
[searchable]="true"
Expand Down Expand Up @@ -346,9 +349,12 @@
</div>
<div class="form-group">
<label>
<span class="label-content required">{{
'addressForm.firstName.label' | cxTranslate
}}</span>
<span class="label-content required">
{{ 'addressForm.firstName.label' | cxTranslate }}
<ng-template
[ngTemplateOutlet]="requiredAsterisk"
></ng-template>
</span>
<input
required="true"
class="form-control"
Expand Down Expand Up @@ -376,9 +382,12 @@
</div>
<div class="form-group">
<label>
<span class="label-content required">{{
'addressForm.lastName.label' | cxTranslate
}}</span>
<span class="label-content required">
{{ 'addressForm.lastName.label' | cxTranslate }}
<ng-template
[ngTemplateOutlet]="requiredAsterisk"
></ng-template>
</span>
<input
required="true"
type="text"
Expand Down Expand Up @@ -406,9 +415,12 @@
</div>
<div class="form-group">
<label>
<span class="label-content required">{{
'addressForm.address1' | cxTranslate
}}</span>
<span class="label-content required">
{{ 'addressForm.address1' | cxTranslate }}
<ng-template
[ngTemplateOutlet]="requiredAsterisk"
></ng-template>
</span>
<input
required="true"
type="text"
Expand Down Expand Up @@ -450,9 +462,12 @@
<div class="row">
<div class="form-group col-md-6">
<label>
<span class="label-content required">{{
'addressForm.city.label' | cxTranslate
}}</span>
<span class="label-content required">
{{ 'addressForm.city.label' | cxTranslate }}
<ng-template
[ngTemplateOutlet]="requiredAsterisk"
></ng-template>
</span>
<input
required="true"
type="text"
Expand Down Expand Up @@ -480,9 +495,12 @@
</div>
<div class="form-group col-md-6">
<label>
<span class="label-content required">{{
'addressForm.zipCode.label' | cxTranslate
}}</span>
<span class="label-content required">
{{ 'addressForm.zipCode.label' | cxTranslate }}
<ng-template
[ngTemplateOutlet]="requiredAsterisk"
></ng-template>
</span>
<input
required="true"
type="text"
Expand Down Expand Up @@ -599,7 +617,9 @@
<ng-template #requiredAsterisk>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
aria-hidden="true"
title="{{ 'common.required' | cxTranslate }}"
>*</abbr
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
</a>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
>*</abbr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"findAStore": "Find a Store",
"findStores": "Find Stores",
"hideOutOfStockOptions": "Hide out of stock options",
"searchPlaceholder": "Enter Zip Code, Town or Address",
"searchPlaceholder": "Enter Zip Code or Town or Address",
"useMyLocation": "Use my location"
},
"addressBookPickupInStore": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
Page,
PointOfService,
RoutingService,
useFeatureStyles,
} from '@spartacus/core';
import {
PickupLocationsSearchFacade,
Expand Down Expand Up @@ -66,6 +67,8 @@ export class MyPreferredStoreComponent implements OnInit {
this.pointOfService = store;
})
);

useFeatureStyles('a11yViewHoursButtonIconContrast');
}

ngOnInit(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export class StoreComponent implements OnInit {

constructor() {
useFeatureStyles('a11yVisibleFocusOverflows');
useFeatureStyles('a11yViewHoursButtonIconContrast');
}

ngOnInit(): void {
Expand Down
3 changes: 3 additions & 0 deletions feature-libs/pickup-in-store/styles/_my-preferred-store.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
.cx-store-opening-hours-icon {
color: var(--cx-color-secondary);
opacity: var(--cx-opacity, 0.5);
@include forFeature('a11yViewHoursButtonIconContrast') {
opacity: var(--cx-opacity, 1);
}
}
padding-inline-start: 0;
padding-top: 0.5rem;
Expand Down
3 changes: 3 additions & 0 deletions feature-libs/pickup-in-store/styles/_store.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
.cx-store-opening-hours-icon {
color: var(--cx-color-secondary);
opacity: var(--cx-opacity, 0.5);
@include forFeature('a11yViewHoursButtonIconContrast') {
opacity: var(--cx-opacity, 1);
}
}
padding-inline-start: 0;
padding-top: 0.5rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Component, Input, Pipe, PipeTransform } from '@angular/core';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import {
FeatureConfigService,
I18nTestingModule,
ImageType,
Product,
Expand Down Expand Up @@ -64,6 +65,7 @@ describe('ConfiguratorOverviewBundleAttributeComponent', () => {
let component: ConfiguratorOverviewBundleAttributeComponent;
let fixture: ComponentFixture<ConfiguratorOverviewBundleAttributeComponent>;
let htmlElem: HTMLElement;
let featureConfigService: FeatureConfigService;

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
Expand All @@ -73,7 +75,10 @@ describe('ConfiguratorOverviewBundleAttributeComponent', () => {
MockConfiguratorPriceComponent,
MockNumericPipe,
],
providers: [{ provide: ProductService, useClass: MockProductService }],
providers: [
{ provide: ProductService, useClass: MockProductService },
FeatureConfigService,
],
}).compileComponents();
}));

Expand All @@ -83,6 +88,7 @@ describe('ConfiguratorOverviewBundleAttributeComponent', () => {
);
component = fixture.componentInstance;
htmlElem = fixture.nativeElement;
featureConfigService = TestBed.inject(FeatureConfigService);
});

beforeEach(() => {
Expand Down Expand Up @@ -142,6 +148,8 @@ describe('ConfiguratorOverviewBundleAttributeComponent', () => {

describe('product image', () => {
it('should be visible if primary', () => {
spyOn(featureConfigService, 'isEnabled').and.returnValue(true);

product$.next(mockProduct);

fixture.detectChanges();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"useMyLocation": "Use my location",
"viewAllStores": "View all stores",
"contactUs": "Contact us",
"searchBox": "Postal code, town or address",
"searchBox": "Postal code or town or address",
"backToList": "Back to list",
"noStoresMessage": "No stores found in database...",
"geolocationNotEnabled": "Cannot locate nearby stores. Geolocation consent has not been enabled",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

<form (ngSubmit)="onSubmit()" [formGroup]="form">
<!-- TODO: (CXSPA-5953) Remove feature flags next major -->
<p *cxFeature="'a11yRequiredAsterisks'" class="form-legend">
{{ 'formLegend.required' | cxTranslate }}
</p>
<label>
<span class="label-content">
{{ 'loginForm.emailAddress.label' | cxTranslate }}
<ng-template [ngTemplateOutlet]="requiredAsterisk"></ng-template>
</span>
<input
required="true"
Expand Down Expand Up @@ -32,6 +36,7 @@
<label>
<span class="label-content">
{{ 'loginForm.password.label' | cxTranslate }}
<ng-template [ngTemplateOutlet]="requiredAsterisk"></ng-template>
</span>
<input
required="true"
Expand Down Expand Up @@ -75,6 +80,7 @@
<abbr
*cxFeature="'a11yRequiredAsterisks'"
class="text-decoration-none"
aria-hidden="true"
title="{{ 'common.required' | cxTranslate }}"
>*</abbr
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<ng-template #requiredAsterisk>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
>*</abbr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@
<ng-template #requiredAsterisk>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
>*</abbr
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
<cx-spinner class="overlay" *ngIf="isUpdating$ | async"> </cx-spinner>
<!-- TODO: (CXSPA-5953) Remove feature flags next major -->
<p *cxFeature="'a11yRequiredAsterisks'" class="form-legend">
{{ 'formLegend.required' | cxTranslate }}
</p>
<form (ngSubmit)="onSubmit()" [formGroup]="form">
<label>
<span class="label-content"
>{{ 'forgottenPassword.emailAddress.label' | cxTranslate }}
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
>*</abbr
>
</span>
<input
required="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@
<ng-template #requiredAsterisk>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
>*</abbr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
<ng-template #requiredAsterisk>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
>*</abbr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
<ng-template #requiredAsterisk>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
>*</abbr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
<ng-template #requiredAsterisk>
<abbr
*cxFeature="'a11yRequiredAsterisks'"
aria-hidden="true"
class="text-decoration-none"
title="{{ 'common.required' | cxTranslate }}"
>*</abbr
Expand Down
Loading

0 comments on commit 96ce03e

Please sign in to comment.