-
Notifications
You must be signed in to change notification settings - Fork 3
feat!: modernize library with functional components and style props API #1864
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: main
Are you sure you want to change the base?
Conversation
1ab9304 to
59de35d
Compare
f47fc6c to
9b78c17
Compare
041af6b to
e2545a3
Compare
BREAKING CHANGES:
- Component styling now uses style props (containerStyle, canvasStyle, etc.)
instead of CSS classes
- canvasWidth/canvasHeight props now apply to CSS display size
- Replaced webpack with rollup for builds
- Restructured exports from src/components/*
Changes:
- Refactor all components to functional React with hooks
- Add customizable style props for all components
- Add dev-only logger utility (stripped in production)
- Add comprehensive unit tests
- Add example app with Vite
- Update i18n structure with JSON locale files
e2545a3 to
7ac9786
Compare
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 pull request modernizes the UI Toolkit React library by migrating from class-based components to functional components with hooks, and replacing styled-components with a style props API for better customization. The changes also streamline the build process by replacing webpack with rollup.
Changes:
- Migrated all React components from class-based to functional components using hooks
- Replaced styled-components with a customizable style props API
- Switched build system from webpack to rollup
- Removed legacy webpack configurations and old test files
- Added comprehensive test coverage for all new components
Reviewed changes
Copilot reviewed 109 out of 117 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
package.json |
Updated dependencies, scripts, and build configuration to use rollup instead of webpack |
rollup.config.js |
New rollup configuration for building ESM and CJS bundles |
src/components/kvm/*, src/components/sol/*, src/components/ider/* |
Migrated components to functional components with hooks and style props API |
src/utils/logger.ts |
New logger utility for development debugging |
src/i18n/* |
Restructured i18n configuration with updated locale files |
example/* |
New Vite-based example application demonstrating component usage |
jest.setup.ts |
Enhanced test setup with comprehensive mocks |
eslint.config.js |
New flat ESLint configuration replacing legacy .eslintrc.json |
Files not reviewed (1)
- example/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| "dependencies": { | ||
| "@device-management-toolkit/ui-toolkit": "^3.3.9", | ||
| "@xterm/xterm": "^5.5.0", |
Copilot
AI
Feb 3, 2026
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.
The example uses @xterm/xterm version ^5.5.0 which is inconsistent with the main package.json which specifies ^6.0.0 (which doesn't exist). These versions should be aligned for consistency across the project.
| "@xterm/xterm": "^5.5.0", | |
| "@xterm/xterm": "^6.0.0", |
… the test case and corrected lint
PR Checklist
What are you changing?
Anything the reviewer should know when reviewing this PR?
If the there are associated PRs in other repositories, please link them here (i.e. device-management-toolkit/repo#365 )