Skip to content

Stop wrapper regeneration - #35270

Draft
alexslavr wants to merge 4 commits into
mainfrom
lavrov/stop-wrappers-generation
Draft

alexslavr wants to merge 4 commits into
mainfrom
lavrov/stop-wrappers-generation

Conversation

@alexslavr

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved bundle registration, wrapper regeneration, and wrapper/API consistency issues remain.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds the Skeleton widget and Angular, React, and Vue wrappers while moving wrapper maintenance away from root-level regeneration.

Changes:

  • Adds Skeleton runtime registration, declarations, types, and nested configuration.
  • Adds framework wrappers and package exports.
  • Updates documentation and CI for manual wrapper maintenance.
File summaries
File Summary
packages/devextreme/js/ui/skeleton.js Adds the public entry point. Critical: register dxSkeleton in standard UI bundles and regenerate metadata/declarations (1 vote).
packages/devextreme/js/ui/skeleton.d.ts Defines API declarations. Moderate: widen the scalar option to number | undefined and update Angular types (2 votes). Nit: add the CheckedEvents integrity block (1 vote).
packages/devextreme/js/ui/skeleton_types.d.ts Reexports Skeleton types.
packages/devextreme/js/__internal/ui/skeleton/skeleton.ts Registers the widget.
packages/devextreme-vue/src/skeleton.ts Adds the Vue wrapper. Moderate: register rootComplexOption in $_expectedChildren (3 votes) and reexport ExplicitTypes (1 vote).
packages/devextreme-vue/src/index.ts Exports the Vue wrapper.
packages/devextreme-react/src/skeleton.ts Adds the React wrapper.
packages/devextreme-react/src/index.ts Exports the React wrapper.
packages/devextreme-angular/src/ui/skeleton/ng-package.json Configures Angular packaging.
packages/devextreme-angular/src/ui/skeleton/nested/root-complex-option.ts Adds the Angular nested option.
packages/devextreme-angular/src/ui/skeleton/nested/ng-package.json Configures nested-option packaging.
packages/devextreme-angular/src/ui/skeleton/nested/index.ts Exports the nested option.
packages/devextreme-angular/src/ui/skeleton/index.ts Adds the Angular component/module. Moderate: reexport ExplicitTypes and prevent unintended child projection (1 vote each).
packages/devextreme-angular/src/ui/all.ts Registers the module in the aggregate module.
packages/devextreme-angular/src/index.ts Exports the Angular wrapper.
package.json Removes root aliases. Moderate: package-level regeneration scripts and Nx targets remain active (1 vote).
CLAUDE.md Documents manual wrapper maintenance.
.github/workflows/wrapper_tests.yml Removes wrapper regeneration validation.
.github/workflows/ts_declarations.yml Updates declaration guidance.
.github/workflows/pr-filter-stubs.yml Removes the regeneration stub.
.github/prompts/update-wrappers.prompt.md Adds manual workflow guidance. Moderate: remaining regeneration scripts and targets contradict this workflow (2 votes).
.github/instructions/wrapper-vue.instructions.md Adds Vue wrapper conventions.
.github/instructions/wrapper-react.instructions.md Adds React wrapper conventions.
.github/instructions/wrapper-angular.instructions.md Adds Angular wrapper conventions.
.github/instructions/public-api-wrappers.instructions.md Adds API propagation guidance.
.github/copilot-instructions.md Updates repository wrapper-development guidance.
Review details

Suppressed comments (4)

package.json:10

  • Removing only the root aliases does not retire wrapper regeneration: packages/devextreme-{angular,react,vue}/package.json still expose regenerate scripts backed by the regenerate Nx targets in each project.json. Those commands can still run the metadata generator and overwrite the hand-maintained wrapper sources, contradicting the new workflow documentation. Remove or disable the package-level scripts/targets as part of this migration.
    "angular:inject-descriptions": "dx-tools inject-descriptions --sources ./packages/devextreme-angular/npm/dist --artifacts ./node_modules/devextreme-metadata/dist",

packages/devextreme-angular/src/ui/skeleton/index.ts:23

  • The public skeleton.d.ts exports ExplicitTypes, and the existing Angular wrappers for components with that type re-export it from their entry files (for example, ui/list/index.ts:24). Without this export, ExplicitTypes is missing from devextreme-angular/ui/skeleton and the wrapper's type surface is inconsistent.
import type { ContentReadyEvent, SkeletonComplexType } from 'devextreme/ui/skeleton';
import type { EventInfo, InitializedEventInfo, ChangedOptionInfo } from 'devextreme/events';

import DxSkeleton from 'devextreme/ui/skeleton';

packages/devextreme-angular/src/ui/skeleton/index.ts:44

  • Because dxSkeleton does not declare @hasTranscludedContent and its Widget implementation has no transcluded-content handling, this template projects arbitrary child markup into the widget host. Use an empty template, as with other non-container widgets, so Angular children are not rendered unexpectedly.
    template: '<ng-content></ng-content>',

packages/devextreme-vue/src/skeleton.ts:4

  • The public skeleton.d.ts exports ExplicitTypes, and all existing Vue wrappers for components with that type re-export it at the top of the component entry. Omitting it makes ExplicitTypes unavailable from devextreme-vue/skeleton and breaks consistency with the other wrapper APIs.
import { PropType } from "vue";
import { defineComponent } from "vue";
import { prepareComponentConfig, prepareConfigurationComponentConfig } from "./core/index";
import Skeleton, { Properties } from "devextreme/ui/skeleton";
  • Files reviewed: 24/26 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@@ -0,0 +1,5 @@
import Skeleton from '../__internal/ui/skeleton/skeleton';
Comment on lines +8 to +11
Use this when a wrapped component's public API changed in
`packages/devextreme/js/{ui,viz}/**/*.d.ts` and the Angular/React/Vue wrappers must be
brought back in sync. The wrappers are maintained by hand — do **not** run the retired
`regenerate-all` / metadata pipeline.
Comment on lines +88 to +91
beforeCreate() {
(this as any).$_WidgetClass = Skeleton;
(this as any).$_hasAsyncTemplate = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants