- Notifications
You must be signed in to change notification settings - Fork 659
Fix TS problems and make TS improvements in demos (Editors) - part 1 #32010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 25_2
Are you sure you want to change the base?
Fix TS problems and make TS improvements in demos (Editors) - part 1 #32010
Conversation
…ements-in-demos-editors-part-1 Signed-off-by: Andrei Kharitonov <pharret31@gmail.com>
There was a problem hiding this 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 improves TypeScript typing and modernizes React patterns across multiple demo files for Editor components (part 1). The changes include adding proper type annotations, separating type imports from value imports, and refactoring components to use modern React syntax.
Key Changes:
- Updated TypeScript lib from ES2022 to ES2023 and added 17 demo directories to type checking coverage
- Added dedicated
types.tsfiles for better type organization across multiple demos - Modernized React patterns: replaced
React.FCwith direct function components, replacedReact.Fragmentwith<>syntax, converted class components to functional components
Reviewed changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/demos/tsconfig.react-check.json | Updated ES lib version and expanded TypeScript checking to include Editors demos |
| apps/demos/Demos/DropDownButton/Overview/React/types.ts | Added type definitions for ProfileSetting, Alignment, FontSize, LineHeight, and TextAlign |
| apps/demos/Demos/DropDownButton/Overview/React/data.ts | Refactored to export typed arrays directly instead of using service pattern |
| apps/demos/Demos/DropDownButton/Overview/React/DropDownButtonTemplate.tsx | Modernized component structure with interface definitions and removed React.FC |
| apps/demos/Demos/DropDownButton/Overview/React/ColorIcon.tsx | Converted class component to functional component with proper typing |
| apps/demos/Demos/DropDownButton/Overview/React/App.tsx | Added comprehensive type annotations and separated type imports |
| apps/demos/Demos/DropDownBox/SingleSelection/React/App.tsx | Added type annotations for state, refs, and callbacks |
| apps/demos/Demos/DropDownBox/MultipleSelection/React/App.tsx | Added type annotations and improved ref typing |
| apps/demos/Demos/DateRangeBox/Overview/React/App.tsx | Added type annotations and cleaned up dependency arrays |
| apps/demos/Demos/DateRangeBox/Formatting/React/App.tsx | Added type annotations for component properties |
| apps/demos/Demos/DateBox/Overview/React/data.ts | Refactored to export typed array directly |
| apps/demos/Demos/DateBox/Overview/React/App.tsx | Added type annotations for state and callbacks |
| apps/demos/Demos/Common/PopupAndNotificationsOverview/React/types.ts | Added HouseType interface definition |
| apps/demos/Demos/Common/PopupAndNotificationsOverview/React/data.ts | Added type annotation for housesSource array |
| apps/demos/Demos/Common/PopupAndNotificationsOverview/React/House.tsx | Replaced inline type definition with imported HouseType |
| apps/demos/Demos/Common/PopupAndNotificationsOverview/React/App.tsx | Added type annotations and improved callback typing |
| apps/demos/Demos/Common/EditorsRightToLeftSupport/React/types.ts | Added EuropeanUnionCountries type definition |
| apps/demos/Demos/Common/EditorsRightToLeftSupport/React/data.ts | Added type annotation for europeanUnion array |
| apps/demos/Demos/Common/EditorsRightToLeftSupport/React/App.tsx | Added type annotations and separated type imports |
| apps/demos/Demos/Common/EditorsOverview/React/Logo.tsx | Converted class component to functional component with proper typing |
| apps/demos/Demos/Common/EditorsOverview/React/App.tsx | Added type annotations throughout and replaced React.Fragment |
| apps/demos/Demos/Common/EditorAppearanceVariants/React/data.ts | Added type annotations using imported DevExtreme types |
| apps/demos/Demos/Common/EditorAppearanceVariants/React/App.tsx | Added type annotations and cleaned up dependency arrays |
| apps/demos/Demos/Common/CustomTextEditorButtons/React/App.tsx | Added comprehensive type annotations for state and callbacks |
| apps/demos/Demos/ColorBox/Overview/React/App.tsx | Added type annotations and separated type imports |
| apps/demos/Demos/CheckBox/Overview/React/App.tsx | Added type annotations for state and callbacks |
| apps/demos/Demos/Chat/Overview/React/data.ts | Added type annotations for functions and arrays |
| apps/demos/Demos/Chat/Overview/React/App.tsx | Added type annotations and replaced React.Fragment |
| apps/demos/Demos/Chat/MessageEditing/React/data.ts | Added type annotations for functions and arrays |
| apps/demos/Demos/Chat/MessageEditing/React/App.tsx | Added comprehensive type annotations including custom types |
| apps/demos/Demos/Chat/FileAttachments/React/data.ts | Changed import to type-only import |
| apps/demos/Demos/Chat/FileAttachments/React/App.tsx | Added type annotations for ref and callbacks |
| apps/demos/Demos/Chat/Customization/React/data.ts | Added type annotations using Format type |
| apps/demos/Demos/Chat/Customization/React/App.tsx | Added type annotations for state and callbacks |
| apps/demos/Demos/Chat/AIAndChatbotIntegration/React/useApi.ts | Added optional chaining for safety |
| apps/demos/Demos/Chat/AIAndChatbotIntegration/React/data.ts | Changed import to type-only import |
| apps/demos/Demos/Chat/AIAndChatbotIntegration/React/Message.tsx | Improved component typing and structure |
| apps/demos/Demos/Chat/AIAndChatbotIntegration/React/App.tsx | Added type annotation for state |
| apps/demos/Demos/Calendar/Overview/React/CustomCell.tsx | Added type annotations throughout component |
| apps/demos/Demos/Calendar/Overview/React/App.tsx | Added comprehensive type annotations for state and callbacks |
| apps/demos/Demos/Calendar/MultipleSelection/React/App.tsx | Added type annotations for state, refs, and callbacks |
| apps/demos/Demos/Autocomplete/Overview/React/data.ts | Added type annotations for exported arrays |
| apps/demos/Demos/Autocomplete/Overview/React/App.tsx | Added comprehensive type annotations including LoadOptions |
…ke-ts-improvements-in-demos-editors-part-1' into 25_2_2978-fix-ts-problems-and-make-ts-improvements-in-demos-editors-part-1
There was a problem hiding this 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 64 out of 64 changed files in this pull request and generated 5 comments.
apps/demos/Demos/Common/PopupAndNotificationsOverview/React/House.tsx Outdated Show resolved Hide resolved
apps/demos/Demos/Common/PopupAndNotificationsOverview/React/House.tsx Outdated Show resolved Hide resolved
There was a problem hiding this 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 65 out of 65 changed files in this pull request and generated 6 comments.
There was a problem hiding this 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 65 out of 65 changed files in this pull request and generated 4 comments.
No description provided.