-
Notifications
You must be signed in to change notification settings - Fork 55
[WC-3027] dg2 selectall #1953
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?
[WC-3027] dg2 selectall #1953
Conversation
e83be09 to
6df26e3
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 PR refactors the widget plugin infrastructure with a significant architectural change from a "reactive controller" pattern to a "setup component" pattern. It introduces dependency injection using the Brandi library and adds "select all pages" functionality to the Data Grid 2 widget.
- Renamed reactive controller interfaces (
ReactiveController→SetupComponent,ReactiveControllerHost→SetupComponentHost,BaseControllerHost→SetupHost) - Introduced Brandi DI container for the datagrid widget to manage dependencies
- Added select all pages feature with progress dialog
- Reorganized internal structure with services, view models, and better separation of concerns
- Fixed multiple issues including test expectations and component naming
Reviewed Changes
Copilot reviewed 86 out of 89 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Added brandi and brandi-react dependencies for DI |
| packages/shared/widget-plugin-mobx-kit/ | Refactored interfaces: SetupComponent, SetupComponentHost, DerivedPropsGate |
| packages/shared/widget-plugin-grid/ | Added SelectAllService, ProgressService, SelectionCounterViewModel |
| packages/pluggableWidgets/datagrid-web/ | Major refactor using DI container, added select all functionality |
| packages/pluggableWidgets/gallery-web/ | Updated to use renamed interfaces |
| packages/shared/widget-plugin-filtering/ | Updated to use SetupComponent interface |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)
packages/shared/widget-plugin-grid/src/view-models/tests/SelectionCounterViewModel.spec.ts:40
- Test description is misleading. It says 'should return 0 when one item is selected' but the test verifies that single selection always returns 0 (by design). The description should clarify this is expected behavior for single selection mode, e.g., 'should return 0 for single selection even when an item is selected (counter only shows multi-selection)'.
packages/shared/widget-plugin-grid/src/services/DatasourceService.ts:126 - This expression has no effect.
| } | ||
|
|
||
| /** | ||
| * This method is a hack to reload selection. To work it requires at leas one object. |
Copilot
AI
Oct 29, 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.
Corrected spelling of 'at leas' to 'at least'.
f9850a6 to
87c7f43
Compare
19b61e3 to
cafaaf9
Compare
022693e to
45e15f9
Compare
Pull request type
Dependency changes (any modification to dependencies in
package.json)Refactoring (e.g. file rename, variable rename, etc.)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to change)
Description