Skip to content

Commit

Permalink
fix: (CXSPA-9035) StoreFinder Truncation on applying text spacing set…
Browse files Browse the repository at this point in the history
…tings (#19691)

Co-authored-by: Giancarlo Cordero Ortiz <[email protected]>
  • Loading branch information
StanislavSukhanov and giancorderoortiz authored Dec 3, 2024
1 parent bb7b6af commit 72bb771
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import { Component, EventEmitter, Input, Output } from '@angular/core';
import { StoreFinderService } from '@spartacus/storefinder/core';
import { useFeatureStyles } from '@spartacus/core';
import { StoreFinderOutlets } from '@spartacus/storefinder/root';
import { AbstractStoreItemComponent } from '../abstract-store-item/abstract-store-item.component';

Expand All @@ -29,6 +30,7 @@ export class StoreFinderListItemComponent extends AbstractStoreItemComponent {

constructor(protected storeFinderService: StoreFinderService) {
super(storeFinderService);
useFeatureStyles('a11yTruncatedTextStoreFinder');
}

handleStoreItemClick() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
}
.cx-store-address-street {
white-space: nowrap;
@include forFeature('a11yTruncatedTextStoreFinder') {
white-space: unset;
}
overflow: hidden;
text-overflow: ellipsis;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,11 @@ export interface FeatureTogglesInterface {
*/
a11yTruncatedTextForResponsiveView?: boolean;

/**
* `StoreFinderListItemComponent` street name is not truncated
*/
a11yTruncatedTextStoreFinder?: boolean;

/**
* When enabled focus outline on the close button inside `ProductImageZoomDialogComponent`
* will be fully visible
Expand Down Expand Up @@ -894,6 +899,7 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
a11yOrganizationLinkableCells: false,
a11yVisibleFocusOverflows: true,
a11yTruncatedTextForResponsiveView: true,
a11yTruncatedTextStoreFinder: false,
a11ySemanticPaginationLabel: false,
a11yPreventCartItemsFormRedundantRecreation: false,
a11yPreventSRFocusOnHiddenElements: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ if (environment.cpq) {
a11yPreventSRFocusOnHiddenElements: true,
a11yVisibleFocusOverflows: true,
a11yTruncatedTextForResponsiveView: true,
a11yTruncatedTextStoreFinder: true,
a11ySemanticPaginationLabel: true,
a11yPreventCartItemsFormRedundantRecreation: true,
a11yMyAccountLinkOutline: true,
Expand Down

0 comments on commit 72bb771

Please sign in to comment.