From 1cbf45450fba4af685c75871458d76277201cd7d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 11 Dec 2025 19:43:47 +0000 Subject: [PATCH 1/3] Initial plan From 5e70e1c873d1deae9f53705ab58bba24a0f9e63c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 11 Dec 2025 19:53:02 +0000 Subject: [PATCH 2/3] Refactor: Move atomic-color-facet schema to private static readonly Co-authored-by: fbeaudoincoveo <23503066+fbeaudoincoveo@users.noreply.github.com> --- .../atomic-color-facet/atomic-color-facet.ts | 90 ++++++++++--------- 1 file changed, 46 insertions(+), 44 deletions(-) diff --git a/packages/atomic/src/components/search/atomic-color-facet/atomic-color-facet.ts b/packages/atomic/src/components/search/atomic-color-facet/atomic-color-facet.ts index 93868653f00..1952ab11315 100644 --- a/packages/atomic/src/components/search/atomic-color-facet/atomic-color-facet.ts +++ b/packages/atomic/src/components/search/atomic-color-facet/atomic-color-facet.ts @@ -106,6 +106,51 @@ export class AtomicColorFacet extends LitElement implements InitializableComponent { + private static readonly propsSchema = new Schema({ + field: new StringValue({required: true, emptyAllowed: false}), + numberOfValues: new NumberValue({min: 1, required: false}), + headingLevel: new NumberValue({min: 0, max: 6, required: false}), + injectionDepth: new NumberValue({min: 0, required: false}), + sortCriteria: new StringValue({ + constrainTo: [ + 'score', + 'alphanumeric', + 'alphanumericDescending', + 'occurrences', + 'alphanumericNatural', + 'alphanumericNaturalDescending', + 'automatic', + ], + required: false, + }), + resultsMustMatch: new StringValue({ + constrainTo: ['atLeastOneValue', 'allValues'], + required: false, + }), + displayValuesAs: new StringValue({ + constrainTo: ['checkbox', 'box'], + required: false, + }), + allowedValues: new ArrayValue({ + each: new StringValue({emptyAllowed: false}), + max: 25, + required: false, + }), + customSort: new ArrayValue({ + each: new StringValue({emptyAllowed: false}), + max: 25, + required: false, + }), + tabsExcluded: new ArrayValue({ + each: new StringValue({emptyAllowed: false}), + required: false, + }), + tabsIncluded: new ArrayValue({ + each: new StringValue({emptyAllowed: false}), + required: false, + }), + }); + static styles = [ facetCommonStyles, facetSearchStyles, @@ -370,50 +415,7 @@ export class AtomicColorFacet tabsExcluded: this.tabsExcluded, tabsIncluded: this.tabsIncluded, }), - new Schema({ - field: new StringValue({required: true, emptyAllowed: false}), - numberOfValues: new NumberValue({min: 1, required: false}), - headingLevel: new NumberValue({min: 0, max: 6, required: false}), - injectionDepth: new NumberValue({min: 0, required: false}), - sortCriteria: new StringValue({ - constrainTo: [ - 'score', - 'alphanumeric', - 'alphanumericDescending', - 'occurrences', - 'alphanumericNatural', - 'alphanumericNaturalDescending', - 'automatic', - ], - required: false, - }), - resultsMustMatch: new StringValue({ - constrainTo: ['atLeastOneValue', 'allValues'], - required: false, - }), - displayValuesAs: new StringValue({ - constrainTo: ['checkbox', 'box'], - required: false, - }), - allowedValues: new ArrayValue({ - each: new StringValue({emptyAllowed: false}), - max: 25, - required: false, - }), - customSort: new ArrayValue({ - each: new StringValue({emptyAllowed: false}), - max: 25, - required: false, - }), - tabsExcluded: new ArrayValue({ - each: new StringValue({emptyAllowed: false}), - required: false, - }), - tabsIncluded: new ArrayValue({ - each: new StringValue({emptyAllowed: false}), - required: false, - }), - }), + AtomicColorFacet.propsSchema, false ); } From a07cd60c18364e40a51808d57a406cb3fde672ef Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Dec 2025 15:19:56 +0000 Subject: [PATCH 3/3] docs: Clarify headingLevel=0 renders div instead of heading Co-authored-by: fbeaudoincoveo <23503066+fbeaudoincoveo@users.noreply.github.com> --- .../search/atomic-color-facet/atomic-color-facet.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/atomic/src/components/search/atomic-color-facet/atomic-color-facet.ts b/packages/atomic/src/components/search/atomic-color-facet/atomic-color-facet.ts index 1952ab11315..7bba6bbc2c3 100644 --- a/packages/atomic/src/components/search/atomic-color-facet/atomic-color-facet.ts +++ b/packages/atomic/src/components/search/atomic-color-facet/atomic-color-facet.ts @@ -289,7 +289,9 @@ export class AtomicColorFacet }) public isCollapsed = false; /** - * The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading over the facet, from 1 to 6. + * The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading over the facet. + * Valid values are 1 to 6, where each number corresponds to a heading element (h1, h2, etc.). + * A value of 0 (default) will render a div instead of a heading element. */ @property({type: Number, attribute: 'heading-level', reflect: true}) public headingLevel = 0;