Skip to content

Conversation

@ajivanyandev
Copy link
Contributor

No description provided.

@ajivanyandev ajivanyandev self-assigned this Oct 29, 2025
Copilot AI review requested due to automatic review settings October 29, 2025 13:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a deprecation warning system for legacy nested configuration components in the DevExtreme Angular wrapper. The implementation detects when developers use generic legacy nested components (like dxi-item, dxo-animation) and warns them to upgrade to component-specific variants (like dxi-accordion-item, dxo-accordion-animation).

Key changes:

  • New deprecation warning utility that detects legacy nested component usage and suggests modern replacements
  • Integration of the warning system into the nested option lifecycle
  • Comprehensive mapping of legacy to modern selectors across all DevExtreme components

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/devextreme-angular/src/core/nested-option.ts Added import and integration of the deprecation warning into NestedOptionHost.setNestedOption()
packages/devextreme-angular/src/core/deprecated-config-warning.ts New file implementing the deprecation warning logic with class name parsing, host component detection, and console warning emission
packages/devextreme-angular/src/core/deprecated-config-map.ts New generated file containing mappings from host components to their legacy/modern nested component selector pairs

Copilot AI review requested due to automatic review settings October 30, 2025 19:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Copilot AI review requested due to automatic review settings October 30, 2025 20:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings November 1, 2025 05:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comment on lines +11 to +12
export * from './warning-helper';
export * from './warning-codes';
Copy link

Copilot AI Nov 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exporting warning-helper and warning-codes as part of the public API may expose internal implementation details. Consider whether these utilities should be publicly exported or if only specific functions like logWarning need to be part of the public API. If they are intended for internal use only, they should not be exported from the package index.

Suggested change
export * from './warning-helper';
export * from './warning-codes';

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +45
function getHostMapping(host: INestedOptionContainer | undefined): DeprecatedConfigEntry | undefined {
const visited = new Set<INestedOptionContainer>();
let current = host;

while (current && !visited.has(current)) {
visited.add(current);

const ctorName = current.constructor?.name;
if (ctorName && Object.prototype.hasOwnProperty.call(DEPRECATED_CONFIG_COMPONENTS, ctorName)) {
return DEPRECATED_CONFIG_COMPONENTS[ctorName] as DeprecatedConfigEntry;
}

current = (current as { _host?: INestedOptionContainer })._host;
}

return undefined;
}
Copy link

Copilot AI Nov 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use hasOwn (available in ES2022) or check the property directly on the object instead of using Object.prototype.hasOwnProperty.call. The current approach is overly verbose. Consider: if (ctorName && ctorName in DEPRECATED_CONFIG_COMPONENTS) or if (ctorName && DEPRECATED_CONFIG_COMPONENTS[ctorName]) since DEPRECATED_CONFIG_COMPONENTS is a const object with known properties.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants