Skip to content

refactor(datagrid-web): layout 2/5: composition to src root, core to features/core - #2575

Closed
iobuhov wants to merge 1 commit into
datagrid-layout-1-columnsfrom
datagrid-layout-2-root
Closed

iobuhov wants to merge 1 commit into
datagrid-layout-1-columnsfrom
datagrid-layout-2-root

Conversation

@iobuhov

@iobuhov iobuhov commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Part 2/5 of the datagrid-web layout follow-up. Move only: files are moved with git mv, and the only edits are import paths, with import-x/order re-sorting those lines. One import in useInfiniteControl.tsx changes from the package self-reference @mendix/datagrid-web/src/core/hooks/injection-hooks to a relative path.

The composition goes directly into the src/ root, next to Datagrid.tsx. The shared foundation moves to features/core/, and core/ is gone after this PR.

Moves

core/containers/{Datagrid.container,Root.container,createDatagridContainer}.ts -> src/
core/containers/__tests__/createDatagridContainer.spec.ts                      -> src/__tests__/
core/hooks/{useDatagridContainer,useDataGridJSActions}.ts                      -> src/
ui/{Widget,WidgetRoot,WidgetHeader,WidgetTopBar,WidgetFooter}.tsx              -> src/
ui/WidgetRoot.viewModel.ts                                                     -> src/
ui/{Grid,GridBody,RowsRenderer,Row,DataCell}.tsx                               -> src/
ui/__tests__/{Grid,WidgetFooter,WidgetTopBar}.spec.tsx (+ snapshot)            -> src/__tests__/
features/columns/GridHeader.tsx                                                -> src/GridHeader.tsx
features/datasource/loader/RowSkeletonLoader.tsx                               -> src/RowSkeletonLoader.tsx
core/ (configs, services, hooks/injection-hooks.ts, tokens.ts)                 -> features/core/

Each of these lays out pieces from several features:

  • GridHeader renders the columns' header parts and selection's CheckboxColumnHeader.
  • RowSkeletonLoader renders columns' SelectorCell, and its only importer is GridBody.
  • useDataGridJSActions is used only by Datagrid.tsx.

After this PR, ui/ holds only generic pieces: CellElement, PseudoModal, WidgetContent, CellComponent and icons/. features/core/tokens.ts still imports feature types. #2577 fixes that.

Stack

Built on top of the structure stack, #2571 (iobuhov/datagrid-structure-12-test-utils).

  1. merge sorting and filtering into columns: refactor(datagrid-web): layout 1/5: merge sorting and filtering into columns #2574
  2. composition to the src root, core to features/core: refactor(datagrid-web): layout 2/5: composition to src root, core to features/core #2575
  3. move misplaced files: refactor(datagrid-web): layout 3/5: move misplaced files #2576
  4. tokens.ts as each feature's public surface: refactor(datagrid-web): layout 3/4: tokens.ts as each feature's public surface #2577
  5. boundary lint rule: refactor(datagrid-web): layout 4/4: boundary lint rule #2578

Checks

Verified locally at this commit in packages/pluggableWidgets/datagrid-web: tsc --noEmit, pnpm run lint (0 errors, the same 10 warnings as the base), pnpm run test (22 suites, 263 tests pass) and pnpm turbo build. A dependency-graph check over src finds no import cycles. No changelog entry, because there is no user-facing change.

🤖 Generated with Claude Code

@github-actions

This comment has been minimized.

…ures/core

Move the DI containers, useDatagridContainer, useDataGridJSActions and
the components that lay out several features' pieces (Widget,
WidgetRoot, WidgetHeader, WidgetTopBar, WidgetFooter, Grid, GridBody,
RowsRenderer, Row, DataCell, GridHeader, RowSkeletonLoader) to the src
root, next to Datagrid.tsx. Their specs move to src/__tests__.

Move the shared foundation (configs, services, tokens, injection hooks)
from core/ to features/core/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iobuhov
iobuhov force-pushed the datagrid-layout-2-root branch from f77a4e9 to 5c9cf11 Compare November 24, 2026 15:26
@iobuhov iobuhov changed the title refactor(datagrid-web): layout 2/5: composition to root/, core to features/core refactor(datagrid-web): layout 2/5: composition to src root, core to features/core Nov 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

AI Code Review

✅ Approved — no issues found


What was reviewed

File Change
packages/pluggableWidgets/datagrid-web/src/* (composition, containers, Widget*, Grid*, Row*, DataCell, hooks) Moved to the src/ root. Import paths only.
packages/pluggableWidgets/datagrid-web/src/features/core/** core/ (configs, services, injection-hooks, tokens) moved here. Import paths only.
packages/pluggableWidgets/datagrid-web/src/features/** (columns, pagination, selection, export, etc.) Import paths updated.
packages/pluggableWidgets/datagrid-web/src/__tests__/** Specs and snapshot moved. Import paths only.

Skipped (out of scope): dist/, pnpm-lock.yaml

CI: pending: code/snyk, triage · unrelated failures: security/snyk (external scanner, no dependency changes in this PR)


Questions

  • None blocking. The PR body says lint, tests and build pass locally. I didn't re-run them. I did check that the diff is symmetric (134 additions and 134 deletions), which fits an import-only change. I also grepped the package and found no import still pointing at the removed core/ or old ui/ paths.

Positives

@iobuhov

iobuhov commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

Replaced by #2579, which moves datagrid-web/src straight to the final feature layout in one move-only PR on top of #2560. The follow-ups continue in #2577 → #2578.

@iobuhov iobuhov closed this Nov 24, 2026
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