Skip to content

Commit 09d74ae

Browse files
jcfrancobenelan
authored andcommitted
fix(shell-center-row): ensure deprecation warning doesn’t show when using standalone shell or shell-panel (#10561)
**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).
1 parent 6704555 commit 09d74ae

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

packages/calcite-components/src/components/shell-center-row/shell-center-row.tsx

+14-6
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ import { Position, Scale } from "../interfaces";
99
import { logger } from "../../utils/logger";
1010
import { CSS, SLOTS } from "./resources";
1111

12-
logger.deprecated("component", {
13-
name: "shell-center-row",
14-
removalVersion: 4,
15-
suggested: "shell-panel",
16-
});
17-
1812
/**
1913
* @deprecated Use the `calcite-shell-panel` component instead.
2014
* @slot - A slot for adding content to the `calcite-shell-panel`.
@@ -69,6 +63,20 @@ export class ShellCenterRow implements ConditionalSlotComponent {
6963
disconnectConditionalSlotComponent(this);
7064
}
7165

66+
//--------------------------------------------------------------------------
67+
//
68+
// Lifecycle
69+
//
70+
//--------------------------------------------------------------------------
71+
72+
componentWillLoad(): void {
73+
logger.deprecated("component", {
74+
name: "shell-center-row",
75+
removalVersion: 4,
76+
suggested: "shell-panel",
77+
});
78+
}
79+
7280
// --------------------------------------------------------------------------
7381
//
7482
// Render Methods

0 commit comments

Comments
 (0)