Skip to content

refactor(datagrid-web): move src to feature layout - #2579

Merged
iobuhov merged 10 commits into
mainfrom
datagrid-feature-layout
Nov 24, 2026
Merged

iobuhov merged 10 commits into
mainfrom
datagrid-feature-layout

Conversation

@iobuhov

@iobuhov iobuhov commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Move only. This PR takes datagrid-web/src from the layout on main (after #2560) to the final feature layout. Every file moves once, straight to its final place. It replaces the structure stack #2562–#2571 and the layout PRs #2574–#2576.

Each commit covers one area and contains only renames (git mv) and import-line edits, so it is easiest to review commit by commit. The only exception is the last commit, which moves declarations between files to break two import cycles. The declarations themselves do not change.

Commits

  1. core/ → features/core/: configs, services, CORE_TOKENS, injection hooks

  2. columns, sorting and filtering → features/columns/: column components and stores, ColumnsSortingStore, ColumnFilterStore, GridColumn, the column/grid models

  3. datasource → features/datasource/: loaders, RefreshStatus, rows model, params and loader controllers

  4. pagination → features/pagination/: Pagination, useInfiniteControl, page and grid size stores

  5. selection → features/selection/: checkbox cell and header, select-all/, counter/, SelectionGate

  6. Studio Pro preview → editor/: ColumnBase, ColumnPreview, DatagridPreview.scss

  7. generic components → ui/: CellElement, ExportAlert, PseudoModal, WidgetContent, CellComponent, icons/

  8. composition → the src/ root, next to Datagrid.tsx: containers, useDatagridContainer, useDataGridJSActions, Widget, WidgetRoot + VM, WidgetHeader, WidgetTopBar, WidgetFooter, Grid, GridBody, RowsRenderer, Row, DataCell, GridHeader, RowSkeletonLoader

  9. composition specs and test-utils → src/__tests__/

  10. declaration moves:

    • the sorting.ts types fold into columns/GridColumn.ts
    • IColumnParentStore moves to ColumnStore.tsx
    • the sort-rule converters move to ColumnGroupStore.ts, their only caller
    • the column settings types move to columns/column-settings.ts
    • SelectionMethod moves to features/core/configs/Datagrid.config.ts

    This removes the GridColumn ↔ sorting and ColumnGroupStore → ColumnsSortingStore → ColumnStore → ColumnGroupStore cycles. The commit also re-sorts a few import lines.

The final tree is identical to the head of #2576: git diff between them is empty.

Chain

#2560 → this PR → #2577 (tokens, bindings and hooks per feature) → #2578 (boundary lint rule)

Checks

Verified locally in packages/pluggableWidgets/datagrid-web:

  • tsc --noEmit passes after every commit.
  • At the head: pnpm run lint (0 errors, the same 10 warnings as the base), pnpm run test (22 suites, 263 tests pass) and pnpm turbo build pass.
  • 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.

iobuhov and others added 10 commits November 24, 2026 16:40
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es/columns

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…__tests__

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move declarations between files, without changing them:
- sorting.ts types (SortInstruction, SortDirection, SortRule) fold into
  columns/GridColumn.ts (GridColumn <-> sorting cycle)
- IColumnParentStore moves to ColumnStore.tsx, and the sort rule
  converters move to ColumnGroupStore.ts, their only caller
  (ColumnGroupStore -> ColumnsSortingStore -> ColumnStore cycle)
- ColumnPersonalizationSettings and ColumnFilterSettings move from
  personalization-settings.ts to columns/column-settings.ts
- SelectionMethod moves from row-interaction/base.ts to
  features/core/configs/Datagrid.config.ts

Other edits are import lines only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iobuhov
iobuhov force-pushed the datagrid-feature-layout branch from 802b05b to d4b953b Compare November 24, 2026 15:40
@github-actions

Copy link
Copy Markdown
Contributor

AI Code Review

✅ Approved — no issues found


What was reviewed

File Change
packages/pluggableWidgets/datagrid-web/src/** (~110 files) Move-only refactor into a feature layout (features/core, columns, datasource, pagination, selection, personalization, data-export, row-interaction), plus editor/, ui/, and the composition files at the src/ root. Import paths are updated. The last commit moves a few declarations to break two import cycles.

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

CI: pending: sigridci, Run code quality check, Read versions file · unrelated failures: security/snyk (7 tests failed in a dependency scan; this PR changes no dependencies)


Notes

  • I reviewed the PR description and file list. I did not trace each moved declaration or import line.
  • The PR reports tsc, lint, 263 passing tests and a successful build locally. I did not re-run them.
  • The PR does not change Datagrid.xml, the widget id, or property keys, so Mendix apps see no breaking change.
  • No changelog entry is needed, because there is no user-facing change.

Positives

  • The change is split into one commit per area. Each commit is rename-plus-import-only, which makes it reviewable commit by commit.
  • It removes the GridColumn ↔ sorting and ColumnGroupStore → ColumnsSortingStore → ColumnStore import cycles. The PR says a dependency-graph check found none left.
  • The PR description gives the verification steps and the chain of related PRs.

@iobuhov
iobuhov enabled auto-merge (rebase) November 24, 2026 15:47
@iobuhov
iobuhov merged commit a2748aa into main Nov 24, 2026
21 of 24 checks passed
@iobuhov
iobuhov deleted the datagrid-feature-layout branch November 24, 2026 16:59
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.

3 participants