fix(devextreme-angular): resolve PivotGrid/FieldChooser texts naming - #34932
Open
ajivanyandev wants to merge 4 commits into
Open
fix(devextreme-angular): resolve PivotGrid/FieldChooser texts naming#34932ajivanyandev wants to merge 4 commits into
ajivanyandev wants to merge 4 commits into
Conversation
…collision devextreme-angular's wrapper generator produced two different nested options with the identical class name DxoPivotGridFieldChooserTextsComponent and selector dxo-pivot-grid-field-chooser-texts: dxPivotGrid's own fieldChooser.texts, and the standalone dxPivotGridFieldChooser's own texts. The generator names classes as Dxo+parentWidgetName+optionName with no collision detection, and "PivotGrid"+"FieldChooserTexts" === "PivotGridFieldChooser"+"Texts". This is invisible under a JIT Angular compiler but a hard NG8023 ambiguous-selector error under AOT. Fixed at the source with a forcedName metadata override in make-integration-metadata.ts — the same mechanism already used for identical collisions elsewhere in that file (e.g. Toolbar.items) — and regenerated the Angular, React, and Vue wrappers. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Resolves an Angular AOT (NG8023) ambiguous-selector error caused by a naming collision in generated wrapper nested options for PivotGrid/FieldChooser texts, by introducing a metadata forcedName override and regenerating affected framework wrappers.
Changes:
- Added an integration-metadata
forcedNameoverride fordxPivotGridOptions.fieldChooser.textsto avoid class/selector collisions during wrapper generation. - Regenerated Vue and React PivotGrid wrappers to expose the renamed nested option (
EmbeddedFieldChooserTexts) and updated expected-children mappings. - Regenerated Angular PivotGrid wrapper nested option to use a new selector/module for the embedded FieldChooser texts and updated PivotGrid module exports/imports accordingly.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme-vue/src/pivot-grid.ts | Renames/rewires nested option component for embedded FieldChooser texts and updates exports/expectedChildren. |
| packages/devextreme-react/src/pivot-grid.ts | Adds EmbeddedFieldChooserTexts nested component and updates FieldChooser expected children + exports. |
| packages/devextreme-metadata/make-integration-metadata.ts | Adds forcedName override to prevent generated wrapper name collisions at the metadata source. |
| packages/devextreme-angular/src/ui/pivot-grid/nested/index.ts | Re-exports the newly generated embedded FieldChooser texts nested component. |
| packages/devextreme-angular/src/ui/pivot-grid/nested/embedded-field-chooser-texts.ts | Introduces the renamed Angular nested option component/selector for embedded FieldChooser texts. |
| packages/devextreme-angular/src/ui/pivot-grid/index.ts | Updates PivotGrid Angular module imports/exports to include the new embedded texts nested module. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+116
to
+118
| addMetadata('ui/pivot_grid:dxPivotGridOptions.fieldChooser.texts', { | ||
| forcedName: 'embeddedFieldChooserTexts', | ||
| }), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(devextreme-angular): resolve PivotGrid/FieldChooser texts naming collision
devextreme-angular's wrapper generator produced two different nested options with the identical class name DxoPivotGridFieldChooserTextsComponent and selector dxo-pivot-grid-field-chooser-texts: dxPivotGrid's own fieldChooser.texts, and the standalone dxPivotGridFieldChooser's own texts. The generator names classes as Dxo+parentWidgetName+optionName with no collision detection, and "PivotGrid"+"FieldChooserTexts" === "PivotGridFieldChooser"+"Texts".
This is invisible under a JIT Angular compiler but a hard NG8023 ambiguous-selector error under AOT.
Fixed at the source with a forcedName metadata override in make-integration-metadata.ts — the same mechanism already used for identical collisions elsewhere in that file (e.g. Toolbar.items) — and regenerated the Angular, React, and Vue wrappers.
Breaking change note: the
forcedNamemetadata override is framework-agnostic - it feeds the Angular, React, and Vue generators from one shared layer, with no way to scope a rename to a single framework. So although the underlying bug (NG8023) is Angular-AOT-only, this PR also renames the React exportFieldChooserTexts→EmbeddedFieldChooserTexts(devextreme-react/pivot-grid) and the Vue exportDxFieldChooserTexts→DxEmbeddedFieldChooserTexts(devextreme-vue/pivot-grid), even though neither framework had a compile error to fix - React/Vue nested-option exports are per-file scoped and never collided. This matches existing precedent in this file (theToolbar.itemsoverrides for DataGrid/TreeList have the same cross-framework effect), so it's consistent with how this mechanism already works, but it should be called out explicitly rather than read as an Angular-only fix.