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 and benelan committed Oct 23, 2024
1 parent 6704555 commit 09d74ae
Showing 1 changed file with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ import { Position, Scale } from "../interfaces";
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 @@ -69,6 +63,20 @@ export class ShellCenterRow implements ConditionalSlotComponent {
disconnectConditionalSlotComponent(this);
}

//--------------------------------------------------------------------------
//
// Lifecycle
//
//--------------------------------------------------------------------------

componentWillLoad(): void {
logger.deprecated("component", {
name: "shell-center-row",
removalVersion: 4,
suggested: "shell-panel",
});
}

// --------------------------------------------------------------------------
//
// Render Methods
Expand Down

0 comments on commit 09d74ae

Please sign in to comment.