From a6d1f81505f9db3e52f0a1951b514a9d0768f5e6 Mon Sep 17 00:00:00 2001 From: Piotr Bartkowiak Date: Wed, 14 Aug 2024 12:29:31 +0200 Subject: [PATCH 1/4] Zoom dialog close on escape --- .../product-image-zoom-dialog.component.html | 30 +++++++++++++++++++ .../feature-toggles/config/feature-toggles.ts | 6 ++++ .../spartacus/spartacus-features.module.ts | 1 + 3 files changed, 37 insertions(+) diff --git a/feature-libs/product/image-zoom/components/product-image-zoom/product-image-zoom-dialog/product-image-zoom-dialog.component.html b/feature-libs/product/image-zoom/components/product-image-zoom/product-image-zoom-dialog/product-image-zoom-dialog.component.html index 7ce53251df3..c08e5e85302 100644 --- a/feature-libs/product/image-zoom/components/product-image-zoom/product-image-zoom-dialog/product-image-zoom-dialog.component.html +++ b/feature-libs/product/image-zoom/components/product-image-zoom/product-image-zoom-dialog/product-image-zoom-dialog.component.html @@ -1,4 +1,34 @@ + - diff --git a/feature-libs/product/image-zoom/components/product-image-zoom/product-image-zoom-dialog/product-image-zoom-dialog.component.spec.ts b/feature-libs/product/image-zoom/components/product-image-zoom/product-image-zoom-dialog/product-image-zoom-dialog.component.spec.ts index d108227872f..2c4f74fa23c 100644 --- a/feature-libs/product/image-zoom/components/product-image-zoom/product-image-zoom-dialog/product-image-zoom-dialog.component.spec.ts +++ b/feature-libs/product/image-zoom/components/product-image-zoom/product-image-zoom-dialog/product-image-zoom-dialog.component.spec.ts @@ -6,7 +6,6 @@ import { KeyboardFocusTestingModule, LaunchDialogService, } from '@spartacus/storefront'; -import { MockFeatureDirective } from 'projects/storefrontlib/shared/test/mock-feature-directive'; import { ProductImageZoomDialogComponent } from './product-image-zoom-dialog.component'; class MockLaunchDialogService { @@ -47,7 +46,6 @@ describe('ProductImageZoomDialogComponent', () => { ProductImageZoomDialogComponent, MockCxIconComponent, MockProductImageZoomViewComponent, - MockFeatureDirective, ], }).compileComponents(); diff --git a/projects/core/src/features-config/feature-toggles/config/feature-toggles.ts b/projects/core/src/features-config/feature-toggles/config/feature-toggles.ts index 2a2cd8eb6af..57fd5368640 100644 --- a/projects/core/src/features-config/feature-toggles/config/feature-toggles.ts +++ b/projects/core/src/features-config/feature-toggles/config/feature-toggles.ts @@ -449,11 +449,6 @@ export interface FeatureTogglesInterface { */ a11yNgSelectMobileReadout?: boolean; - /** - * When enabled, the 'ProductImageZoomDialogComponent' will be closed when the user presses the 'Esc' key. - */ - a11yZoomDialogCloseOnEsc?: boolean; - /** * In OCC cart requests, it puts parameters of a cart name and cart description * into a request body, instead of query params. @@ -537,7 +532,6 @@ export const defaultFeatureToggles: Required = { a11yDeliveryModeRadiogroup: false, a11yAddedToCartActiveDialog: false, a11yNgSelectMobileReadout: false, - a11yZoomDialogCloseOnEsc: false, occCartNameAndDescriptionInHttpRequestBody: false, cmsBottomHeaderSlotUsingFlexStyles: false, }; diff --git a/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts b/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts index e2741371dfe..fd5a982089e 100644 --- a/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts +++ b/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts @@ -346,7 +346,6 @@ if (environment.cpq) { a11yDeliveryModeRadiogroup: true, a11yAddedToCartActiveDialog: true, a11yNgSelectMobileReadout: true, - a11yZoomDialogCloseOnEsc: true, cmsBottomHeaderSlotUsingFlexStyles: true, }; return appFeatureToggles;