Skip to content

Commit

Permalink
fix(atomic): missing "backdrop" part for `atomic-insight-user-actions…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexprudhomme committed Feb 28, 2025
1 parent 6c07d5f commit 1e2bd7b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const ATOMIC_MODAL_EXPORT_PARTS =
'backdrop,container,header-wrapper,header,header-ruler,body-wrapper,body,footer-wrapper,footer';
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
} from '../../../../utils/initialization-utils';
import {updateBreakpoints} from '../../../../utils/replace-breakpoint';
import {once, randomID} from '../../../../utils/utils';
import {ATOMIC_MODAL_EXPORT_PARTS} from '../../atomic-modal/export-parts';
import {FieldsetGroup} from '../../fieldset-group';
import {IconButton} from '../../iconButton';
import {AnyBindings} from '../../interface/bindings';
Expand Down Expand Up @@ -436,7 +437,7 @@ export class AtomicGeneratedAnswerFeedbackModal
close={() => this.close()}
container={this.host}
part="generated-answer-feedback-modal"
exportparts="backdrop,container,header,header-wrapper,header-ruler,body,body-wrapper,footer,footer-wrapper,footer-wrapper"
exportparts={ATOMIC_MODAL_EXPORT_PARTS}
>
{this.renderHeader()}
{this.renderBody()}
Expand Down
6 changes: 2 additions & 4 deletions packages/atomic/src/components/common/refine-modal/modal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {FunctionalComponent, h} from '@stencil/core';
import {i18n} from 'i18next';
import CloseIcon from '../../../images/close.svg';
import {ATOMIC_MODAL_EXPORT_PARTS} from '../atomic-modal/export-parts';
import {BaseFacetElement} from '../facets/facet-common';
import {popoverClass} from '../facets/popover/popover-type';
import {isRefineModalFacet} from '../interface/store';
Expand All @@ -22,9 +23,6 @@ export const RefineModal: FunctionalComponent<RefineModalProps> = (
props,
children
) => {
const exportparts =
'container,header,header-wrapper,header-ruler,body,body-wrapper,footer,footer-wrapper,footer-wrapper';

const flushFacetElements = () => {
props.host.querySelector('div[slot="facets"]')?.remove();
};
Expand Down Expand Up @@ -86,7 +84,7 @@ export const RefineModal: FunctionalComponent<RefineModalProps> = (
flushFacetElements();
}
}}
exportparts={exportparts}
exportparts={ATOMIC_MODAL_EXPORT_PARTS}
boundary={props.boundary}
scope={props.scope}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {SmartSnippet, SmartSnippetFeedback} from '@coveo/headless';
import {EventEmitter, h} from '@stencil/core';
import {updateBreakpoints} from '../../../../utils/replace-breakpoint';
import {once} from '../../../../utils/utils';
import {ATOMIC_MODAL_EXPORT_PARTS} from '../../atomic-modal/export-parts';
import {AnyBindings} from '../../interface/bindings';
import {Button} from '../../stencil-button';

Expand Down Expand Up @@ -192,7 +193,7 @@ export class SmartSnippetFeedbackModalCommon {
container={this.props.getHost()}
isOpen={this.props.getIsOpen()}
close={() => this.close()}
exportparts="backdrop,container,header,header-wrapper,header-ruler,body,body-wrapper,footer,footer-wrapper,footer-wrapper"
exportparts={ATOMIC_MODAL_EXPORT_PARTS}
>
{this.renderHeader()}
{this.renderBody()}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {ATOMIC_MODAL_EXPORT_PARTS} from '@/src/components/common/atomic-modal/export-parts';
import {Component, h, State, Prop, Element, Watch, Host} from '@stencil/core';
import CloseIcon from '../../../../images/close.svg';
import {rectEquals} from '../../../../utils/dom-utils';
Expand All @@ -8,9 +9,6 @@ import {
import {Button} from '../../../common/stencil-button';
import {InsightBindings} from '../../atomic-insight-interface/atomic-insight-interface';

const exportparts =
'container,header,header-wrapper,header-ruler,body,body-wrapper,footer,footer-wrapper,footer-wrapper';

/**
* @internal
* The `atomic-insight-user-actions-modal` is automatically created as a child of the `atomic-insight-interface` when the `atomic-insight-user-actions-toggle` is initialized.
Expand Down Expand Up @@ -143,7 +141,7 @@ export class AtomicInsightUserActionsModal
source={this.openButton}
container={this.host}
close={() => (this.isOpen = false)}
exportparts={exportparts}
exportparts={ATOMIC_MODAL_EXPORT_PARTS}
scope={this.bindings.interfaceElement}
>
{renderHeader()}
Expand Down

0 comments on commit 1e2bd7b

Please sign in to comment.