From 62cf80c433ce13a7960c4a0cad5cc476a6e7b21f Mon Sep 17 00:00:00 2001 From: Maria Hutt Date: Fri, 28 Mar 2025 14:50:11 -0700 Subject: [PATCH] refactor(alert): update comments --- core/api.txt | 3 +++ core/src/components.d.ts | 2 +- core/src/components/alert/alert.tsx | 19 ++++++++----------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/core/api.txt b/core/api.txt index 201c86c28d..c8fc4b2c00 100644 --- a/core/api.txt +++ b/core/api.txt @@ -100,12 +100,15 @@ ion-alert,scoped ion-alert,prop,animated,boolean,true,false,false ion-alert,prop,backdropDismiss,boolean,true,false,false ion-alert,prop,buttons,(string | AlertButton)[],[],false,false +ion-alert,prop,component,Function | HTMLElement | null | string | undefined,undefined,false,false +ion-alert,prop,componentProps,undefined | { [key: string]: any; },undefined,false,false ion-alert,prop,cssClass,string | string[] | undefined,undefined,false,false ion-alert,prop,enterAnimation,((baseEl: any, opts?: any) => Animation) | undefined,undefined,false,false ion-alert,prop,header,string | undefined,undefined,false,false ion-alert,prop,htmlAttributes,undefined | { [key: string]: any; },undefined,false,false ion-alert,prop,inputs,AlertInput[],[],false,false ion-alert,prop,isOpen,boolean,false,false,false +ion-alert,prop,keepContentsMounted,boolean,false,false,false ion-alert,prop,keyboardClose,boolean,true,false,false ion-alert,prop,leaveAnimation,((baseEl: any, opts?: any) => Animation) | undefined,undefined,false,false ion-alert,prop,message,IonicSafeString | string | undefined,undefined,false,false diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 0219161829..954980bca8 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -5115,7 +5115,7 @@ declare namespace LocalJSX { */ "onIonAlertWillPresent"?: (event: IonAlertCustomEvent) => void; /** - * Emitted before the alert has presented, but after the component has been mounted in the DOM. This event exists for ion-alert to resolve an issue with the alert and the lazy build, that the transition is unable to get the correct dimensions of the alert with auto sizing. This is not required for other overlays, since the existing overlay transitions are not effected by auto sizing content. + * Emitted before the modal has presented, but after the component has been mounted in the DOM. This event exists so iOS can run the entering transition properly */ "onIonMount"?: (event: IonAlertCustomEvent) => void; /** diff --git a/core/src/components/alert/alert.tsx b/core/src/components/alert/alert.tsx index 7e8bc865be..0c13a93776 100644 --- a/core/src/components/alert/alert.tsx +++ b/core/src/components/alert/alert.tsx @@ -386,13 +386,10 @@ export class Alert implements ComponentInterface, OverlayInterface { } /** - * Emitted before the alert has presented, but after the component + * Emitted before the modal has presented, but after the component * has been mounted in the DOM. - * This event exists for ion-alert to resolve an issue with the - * alert and the lazy build, that the transition is unable to get - * the correct dimensions of the alert with auto sizing. - * This is not required for other overlays, since the existing - * overlay transitions are not effected by auto sizing content. + * This event exists so iOS can run the entering + * transition properly * * @internal */ @@ -586,7 +583,7 @@ export class Alert implements ComponentInterface, OverlayInterface { if (dismissed) { /** - * If using popover inline + * If using alert inline * we potentially need to use the coreDelegate * so that this works in vanilla JS apps */ @@ -972,10 +969,10 @@ export class Alert implements ComponentInterface, OverlayInterface { } const LIFECYCLE_MAP: any = { - ionPopoverDidPresent: 'ionViewDidEnter', - ionPopoverWillPresent: 'ionViewWillEnter', - ionPopoverWillDismiss: 'ionViewWillLeave', - ionPopoverDidDismiss: 'ionViewDidLeave', + ionAlertDidPresent: 'ionViewDidEnter', + ionAlertWillPresent: 'ionViewWillEnter', + ionAlertWillDismiss: 'ionViewWillLeave', + ionAlertDidDismiss: 'ionViewDidLeave', }; const inputClass = (input: AlertInput): CssClassMap => {