Repository navigation
Fix TS in editors demos. Part 2/2 - #36535
Open
GoodDayForSurf wants to merge 11 commits into
Open
GoodDayForSurf wants to merge 11 commits into
GoodDayForSurf wants to merge 11 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical type mismatches in the NumberBox, RangeSlider, and LoadPanel demo bindings fail the newly enabled strict Angular template checks because nullable outputs are assigned to non-nullable signals.
2 open issues
What changed in this PR
This PR improves strict TypeScript compatibility in DevExtreme’s Angular editor demos and enables Angular type checking in demo CI.
Changes:
- Adds explicit types, nullable state handling, and safer event handlers across demos.
- Updates template bindings and widens the Angular NumberBox value type to allow
undefined. - Enables strict checking with bundler module resolution for selected demo families.
| File | Description |
|---|---|
packages/devextreme-angular/src/ui/number-box/index.ts |
Allows undefined values in the input and change output. |
apps/demos/tsconfig.ngc-check.json |
Enables strict checking and scopes included demos. |
apps/demos/Demos/Validation/Overview/Angular/app/app.component.ts |
Defines a typed email validation rule array. |
apps/demos/Demos/Validation/Overview/Angular/app/app.component.html |
Binds the email validation rule array. |
apps/demos/Demos/Toast/Stack/Angular/app/app.component.ts |
Types stack options, optional offsets, and radio events. |
apps/demos/Demos/Toast/Overview/Angular/app/app.service.ts |
Converts the product model to an interface. |
apps/demos/Demos/Toast/Overview/Angular/app/app.component.ts |
Constrains toast state to supported types. |
apps/demos/Demos/TagBox/TagCountLimitation/Angular/app/app.service.ts |
Uses an interface with nullable inventory. |
apps/demos/Demos/TagBox/TagCountLimitation/Angular/app/app.component.ts |
Handles absent selected items. |
apps/demos/Demos/TagBox/Overview/Angular/app/app.service.ts |
Uses an interface with nullable inventory. |
apps/demos/Demos/TagBox/Overview/Angular/app/app.component.ts |
Types nullable state and guards empty custom items. |
apps/demos/Demos/TagBox/Overview/Angular/app/app.component.html |
Guards product rendering with Angular control flow. |
apps/demos/Demos/TagBox/Grouping/Angular/app/app.service.ts |
Converts the product model to an interface. |
apps/demos/Demos/TagBox/Grouping/Angular/app/app.component.html |
Uses a boolean property binding for search. |
apps/demos/Demos/RangeSlider/Overview/Angular/app/app.component.ts |
Types label and tooltip configuration. |
apps/demos/Demos/ProgressBar/Overview/Angular/app/app.component.ts |
Marks the interval identifier as optional. |
apps/demos/Demos/Popup/Overview/Angular/app/app.service.ts |
Converts the employee model to an interface. |
apps/demos/Demos/Popup/Overview/Angular/app/app.component.ts |
Types partial employee state and optional positioning. |
apps/demos/Demos/NumberBox/Overview/Angular/app/app.component.ts |
Adds sales signal state and guards keyboard events. |
apps/demos/Demos/NumberBox/Overview/Angular/app/app.component.html |
Uses sales state for editing and stock calculation. |
apps/demos/Demos/Lookup/Templates/Angular/app/app.service.ts |
Converts the employee model to an interface. |
apps/demos/Demos/Lookup/Templates/Angular/app/app.component.ts |
Types the nullable display-expression argument. |
apps/demos/Demos/Lookup/EventHandling/Angular/app/app.service.ts |
Converts the employee model to an interface. |
apps/demos/Demos/Lookup/EventHandling/Angular/app/app.component.ts |
Returns an empty string for missing display text. |
apps/demos/Demos/Lookup/Basics/Angular/app/app.service.ts |
Converts the task model to an interface. |
apps/demos/Demos/LoadPanel/Overview/Angular/app/app.service.ts |
Converts the employee model to an interface. |
apps/demos/Demos/LoadPanel/Overview/Angular/app/app.component.ts |
Adds partial employee state and outside-click signal state. |
apps/demos/Demos/LoadPanel/Overview/Angular/app/app.component.html |
Connects outside-click behavior through signal bindings. |
apps/demos/Demos/HtmlEditor/Overview/Angular/app/app.service.ts |
Types image-upload tabs using the widget API. |
apps/demos/Demos/HtmlEditor/Mentions/Angular/app/app.service.ts |
Converts the employee model to an interface. |
apps/demos/Demos/HtmlEditor/AITextEditing/Angular/app/ai/ai.service.ts |
Defaults absent prompts and response content to strings. |
apps/demos/Demos/FileUploader/CustomDropzone/Angular/app/app.component.ts |
Types upload events and guards optional drag data. |
apps/demos/Demos/FileUploader/ChunkUpload/Angular/app/app.component.ts |
Types upload helpers and guards DOM access. |
.github/workflows/visual-tests-demos.yml |
Enables the Angular TypeScript check in CI. |
Review effort: Balanced
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The widened NumberBox output breaks strict template checking for existing numeric bindings, while cleared-value handlers leave editors and dependent values out of sync.
3 open issues
2 resolved since last review
Review effort: Balanced
| * This member supports the internal infrastructure and is not intended to be used directly from your code. | ||
| */ | ||
| @Output() valueChange: EventEmitter<number>; | ||
| @Output() valueChange: EventEmitter<number | undefined>; |
| (onKeyDown)="keyDown($event)" | ||
| [value]="16" | ||
| [value]="sales()" | ||
| (valueChange)="sales.set($event ?? sales())" |
| <dx-number-box | ||
| [(value)]="start" | ||
| [value]="start()" | ||
| (valueChange)="start.set($event ?? start())" |
Signed-off-by: Aliullov Vlad <91639107+GoodDayForSurf@users.noreply.github.com>
…main_ts_angular_demos_editors_p2 # Conflicts: # apps/demos/Demos/TagBox/Grouping/Angular/app/app.component.html # apps/demos/tsconfig.ngc-check.json
…to main_ts_angular_demos_editors_p2 # Conflicts: # apps/demos/tsconfig.ngc-check.json
This branch has not been deployed
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.


No description provided.