From a456c22efaef409e4d507606b698c0d32714dacc Mon Sep 17 00:00:00 2001 From: JC Franco Date: Mon, 21 Oct 2024 12:04:13 -0700 Subject: [PATCH] =?UTF-8?q?fix(shell-center-row):=20ensure=20deprecation?= =?UTF-8?q?=20warning=20doesn=E2=80=99t=20show=20when=20using=20standalone?= =?UTF-8?q?=20`shell`=20or=20`shell-panel`=20(#10561)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Related Issue:** #10563 ## Summary Moves deprecation warnings to show when `shell-center-row` is added to the DOM and initially loaded. This warning was being shown due to [bundling](https://github.com/Esri/calcite-design-system/blob/dev/packages/calcite-components/stencil.config.ts#L76). --- .../shell-center-row/shell-center-row.tsx | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/calcite-components/src/components/shell-center-row/shell-center-row.tsx b/packages/calcite-components/src/components/shell-center-row/shell-center-row.tsx index 1c7be66cf48..4f757c03527 100644 --- a/packages/calcite-components/src/components/shell-center-row/shell-center-row.tsx +++ b/packages/calcite-components/src/components/shell-center-row/shell-center-row.tsx @@ -4,12 +4,6 @@ import { slotChangeGetAssignedElements } from "../../utils/dom"; import { logger } from "../../utils/logger"; import { CSS, SLOTS } from "./resources"; -logger.deprecated("component", { - name: "shell-center-row", - removalVersion: 4, - suggested: "shell-panel", -}); - /** * @deprecated Use the `calcite-shell-panel` component instead. * @slot - A slot for adding content to the `calcite-shell-panel`. @@ -52,6 +46,20 @@ export class ShellCenterRow { @State() actionBar: HTMLCalciteActionBarElement; + //-------------------------------------------------------------------------- + // + // Lifecycle + // + //-------------------------------------------------------------------------- + + componentWillLoad(): void { + logger.deprecated("component", { + name: "shell-center-row", + removalVersion: 4, + suggested: "shell-panel", + }); + } + // -------------------------------------------------------------------------- // // Render Methods