-
Notifications
You must be signed in to change notification settings - Fork 59
[WIP] DG improvements #1985
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?
[WIP] DG improvements #1985
Conversation
eae5be7 to
a3f666d
Compare
Co-authored-by: Copilot <[email protected]>
6b44437 to
fc9dceb
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 is a work-in-progress pull request that performs a major architectural refactoring of the Data Grid widget, introducing dependency injection patterns, modernizing state management with MobX, and upgrading the React Testing Library. The changes improve code organization, testability, and maintainability while preserving existing functionality.
Key Changes:
- Upgraded
@testing-library/reactfrom 13.4.0 to 16.3.0 - Introduced dependency injection using Brandi containers with organized token namespaces (CORE_TOKENS, DG_TOKENS, SA_TOKENS)
- Refactored selection logic into service interfaces (SelectionHelperService, SelectActionsService) with factory functions
- Simplified React components by removing prop drilling and using injection hooks
- Rewrote tests to use atomic state patterns instead of GateProvider patterns
Reviewed Changes
Copilot reviewed 106 out of 107 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updated @testing-library/react dependency to v16.3.0 with new peer dependency structure |
| widget-plugin-mobx-kit/src/main.ts | Exported MappedGate helper class for prop transformation |
| widget-plugin-mobx-kit/src/MappedGate.ts | New helper class to create gates that map props from another gate |
| widget-plugin-grid/src/utils/mobx-test-setup.ts | Added MobX test configuration to disable action enforcement |
| widget-plugin-grid/src/selection/* | Refactored selection logic into service interfaces and factory functions |
| widget-plugin-grid/src/core/models/*.ts | New atomic model functions for datasource, selection, and empty state |
| widget-plugin-grid/src/core/tests/*.spec.ts | New unit tests for atomic model functions with good coverage |
| datagrid-web/src/model/tokens.ts | Reorganized dependency tokens into logical namespaces (CORE, DG, SA) |
| datagrid-web/src/model/containers/* | Refactored container initialization with improved separation of concerns |
| datagrid-web/src/components/* | Simplified components using injection hooks instead of prop drilling |
| datagrid-web/src/utils/test-utils.tsx | Updated test utilities to use new container patterns |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| mode: SelectionMode, | ||
| event: MoveEvent1D | MoveEvent2D | ||
| ): void; | ||
| togglePageSelection(): void; |
Copilot
AI
Nov 21, 2025
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.
This overload of togglePageSelection() is unreachable, the previous overload will always be selected.
Pull request type
Description