Skip to content

Conversation

@pharret31
Copy link
Contributor

No description provided.

@pharret31 pharret31 self-assigned this Dec 19, 2025
@pharret31 pharret31 marked this pull request as ready for review December 19, 2025 21:04
@pharret31 pharret31 requested a review from a team as a code owner December 19, 2025 21:04
Copilot AI review requested due to automatic review settings December 19, 2025 21:04
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 enhances TypeScript type safety and consistency in React demos for Editor components (part 3), covering Switch, TagBox, TextArea, TextBox, Toast, Tooltip, and Validation demos. The changes add these demos to tsconfig.react-check.json for type checking and implement TypeScript best practices throughout.

Key improvements include:

  • Separating type imports from value imports using import type syntax
  • Adding explicit type annotations to state variables and function parameters
  • Removing unnecessary setState setters from useCallback/useMemo dependency arrays
  • Replacing React.Fragment with the <> shorthand syntax
  • Improving component prop destructuring patterns
  • Creating dedicated type definition files for better code organization

Reviewed changes

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

Show a summary per file
File Description
apps/demos/tsconfig.react-check.json Adds Switch, TagBox, TextArea, TextBox, Toast, Tooltip, and Validation demo paths for TypeScript checking
apps/demos/Demos/Validation/Overview/ReactJs/App.js Removes setState setters from useCallback dependency arrays (best practice)
apps/demos/Demos/Validation/Overview/React/App.tsx Adds comprehensive type annotations, separates type imports, and improves function signatures; contains useMemo syntax errors
apps/demos/Demos/Tooltip/Overview/React/App.tsx Replaces deprecated ITooltipOptions with TooltipTypes.Properties
apps/demos/Demos/Toast/Stack/ReactJs/App.js Removes setState setters from dependency arrays and replaces React.Fragment with <>
apps/demos/Demos/Toast/Stack/React/types.ts Adds NotifyStack type definition extracted from Notify function
apps/demos/Demos/Toast/Stack/React/data.ts Adds proper type annotations to exported data arrays
apps/demos/Demos/Toast/Stack/React/App.tsx Adds comprehensive types, improves callback signatures, uses SelectBox event destructuring
apps/demos/Demos/Toast/Overview/ReactJs/ProductItem.js Improves prop destructuring and dependency arrays
apps/demos/Demos/Toast/Overview/ReactJs/App.js Removes setState setters from dependency arrays
apps/demos/Demos/Toast/Overview/React/types.ts Adds Product and ToastConfig type definitions
apps/demos/Demos/Toast/Overview/React/data.ts Adds Product type annotation to products array
apps/demos/Demos/Toast/Overview/React/ProductItem.tsx Adds proper type annotations and improves prop destructuring
apps/demos/Demos/Toast/Overview/React/App.tsx Adds comprehensive type annotations and improves callback typing
apps/demos/Demos/TextBox/Overview/React/App.tsx Adds type annotations and separates type imports
apps/demos/Demos/TextArea/Overview/ReactJs/data.js Refactors from default export object to named exports
apps/demos/Demos/TextArea/Overview/ReactJs/App.js Updates to use named imports and replaces React.Fragment with <>
apps/demos/Demos/TextArea/Overview/React/types.ts Adds ValueChangeEvent type definition
apps/demos/Demos/TextArea/Overview/React/data.ts Refactors to named exports with proper types
apps/demos/Demos/TextArea/Overview/React/App.tsx Adds comprehensive type annotations and improves callback signatures
apps/demos/Demos/TagBox/TagCountLimitation/React/types.ts Adds Product type definition with nullable Current_Inventory
apps/demos/Demos/TagBox/TagCountLimitation/React/data.ts Adds Product type annotation to products array
apps/demos/Demos/TagBox/TagCountLimitation/React/App.tsx Adds type annotations and uses satisfies for type safety
apps/demos/Demos/TagBox/Overview/ReactJs/Tag.js Replaces React.Fragment with <>
apps/demos/Demos/TagBox/Overview/ReactJs/App.js Fixes product state initialization from {} to null
apps/demos/Demos/TagBox/Overview/React/types.ts Adds Product type definition (has type mismatch issue)
apps/demos/Demos/TagBox/Overview/React/data.ts Moves Product type to types.ts and adds proper annotations
apps/demos/Demos/TagBox/Overview/React/Tag.tsx Adds comprehensive type annotations for props
apps/demos/Demos/TagBox/Overview/React/Item.tsx Adds type annotations for component props
apps/demos/Demos/TagBox/Overview/React/App.tsx Adds comprehensive types, improves state initialization and callback typing
apps/demos/Demos/TagBox/Grouping/ReactJs/data.js Changes from default export to named export
apps/demos/Demos/TagBox/Grouping/ReactJs/App.js Updates to use named import and removes unnecessary useState
apps/demos/Demos/TagBox/Grouping/React/types.ts Adds Product type definition
apps/demos/Demos/TagBox/Grouping/React/data.ts Adds Product type annotation to products array
apps/demos/Demos/TagBox/Grouping/React/Group.tsx Adds GroupProps interface for type safety
apps/demos/Demos/TagBox/Grouping/React/App.tsx Adds types, uses satisfies, and removes unnecessary useState
apps/demos/Demos/Switch/Overview/ReactJs/App.js Improves callback to use destructuring pattern
apps/demos/Demos/Switch/Overview/React/App.tsx Adds type annotations and improves callback destructuring

@pharret31 pharret31 force-pushed the 25_2_2978-fix-ts-problems-and-make-ts-improvements-in-demos-editors-part-3 branch from da78946 to 3b1529a Compare December 24, 2025 14:26
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.

1 participant