Skip to content

Commit

Permalink
Merge ffcc4c7 into 9cfdfd1
Browse files Browse the repository at this point in the history
  • Loading branch information
StanislavSukhanov authored Oct 10, 2024
2 parents 9cfdfd1 + ffcc4c7 commit 2e7c61d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 1 deletion.
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 @@ -5,7 +5,7 @@
*/

import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { PointOfServiceStock } from '@spartacus/core';
import { PointOfServiceStock, useFeatureStyles } from '@spartacus/core';
import { storeHasStock } from '@spartacus/pickup-in-store/core';
import { ICON_TYPE } from '@spartacus/storefront';

Expand All @@ -29,6 +29,10 @@ export class StoreComponent implements OnInit {
openHoursOpen = false;
readonly ICON_TYPE = ICON_TYPE;

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

ngOnInit(): void {
this.isInStock = storeHasStock(this.storeDetails);
}
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 @@ -582,6 +582,12 @@ export interface FeatureTogglesInterface {
*/
a11yItemCounterFocus?: boolean;

/**
* `StoreComponent and MyPreferredStoreComponent` an icon in a button that triggers showing
* store's opening hours has an acceptable contrast ratio in a default theme
*/
a11yViewHoursButtonIconContrast?: boolean;

/**
* In OCC cart requests, it puts parameters of a cart name and cart description
* into a request body, instead of query params.
Expand Down Expand Up @@ -725,6 +731,7 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
a11yAddToWishlistFocus: false,
a11ySearchBoxFocusOnEscape: false,
a11yItemCounterFocus: false,
a11yViewHoursButtonIconContrast: false,
occCartNameAndDescriptionInHttpRequestBody: false,
cmsBottomHeaderSlotUsingFlexStyles: false,
useSiteThemeService: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ if (environment.cpq) {
a11yAddToWishlistFocus: true,
a11ySearchBoxFocusOnEscape: true,
a11yItemCounterFocus: true,
a11yViewHoursButtonIconContrast: true,
cmsBottomHeaderSlotUsingFlexStyles: true,
useSiteThemeService: false,
enableConsecutiveCharactersPasswordRequirement: true,
Expand Down

0 comments on commit 2e7c61d

Please sign in to comment.