Skip to content

Commit

Permalink
fix(shell-center-row): ensure deprecation warning doesn’t show when u…
Browse files Browse the repository at this point in the history
…sing 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).
  • Loading branch information
jcfranco authored Oct 21, 2024
1 parent a194844 commit a456c22
Showing 1 changed file with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a456c22

Please sign in to comment.