Frontmatter
| id | 9017 |
| title | Refactor Grid.Body to extend Component.Base and use internal Row Pool |
| state | Closed |
| labels | airefactoringarchitecture |
| assignees | tobiu |
| createdAt | Feb 6, 2026, 6:39 PM |
| updatedAt | Feb 6, 2026, 6:57 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9017 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Feb 6, 2026, 6:57 PM |
Refactor Grid.Body to extend Component.Base and use internal Row Pool

tobiu
Feb 6, 2026, 6:56 PM
Input from Gemini 3 Pro:
✦ I have refactored
Neo.grid.Bodyto extendNeo.component.Baseinstead ofNeo.container.Base. This enforces API safety by hiding inapplicable container methods (add,remove,layout) and removes the overhead of unused logic.Key Changes:
- Inheritance: Changed parent class to
Neo.component.Base.- Row Pool: Replaced
itemsconfig with a protecteditemsarray.- Lifecycle: Implemented
destroy()to manually destroy row instances.- Propagation: Implemented
afterSetAppName,afterSetTheme,afterSetWindowId, andafterSetMountedto manually propagate state to the row pool.- Creation: Updated
createRowPoolto manually instantiate rows with full context.- Documentation: Updated JSDoc to reflect the architectural shift and the reasoning ("Row Manager" role).
I verified the changes against the demos, and no regressions were found. The code has been pushed to
dev.
tobiu assigned to @tobiu on Feb 6, 2026, 6:56 PM
tobiu closed this issue on Feb 6, 2026, 6:57 PM
tobiu cross-referenced by #9018 on Feb 6, 2026, 7:09 PM
tobiu cross-referenced by #9019 on Feb 6, 2026, 7:14 PM
Objective: Revert
Neo.grid.Bodyinheritance fromNeo.container.BasetoNeo.component.Base. The new "Fixed-DOM-Order" Row Pooling strategy renders the Container API (add,remove,layout) unsafe and redundant.Changes Required:
Inheritance:
src/grid/Body.mjsto extendNeo.component.Base.Row Pool Management:
itemsconfig with a private/protected class field (e.g.,items = []) to storeNeo.grid.Rowinstances.createRowPoolto instantiate rows with:parentId: me.id, appName : me.appName, windowId: me.windowId, theme : me.themeLifecycle Management:
destroy()to manually iterate and destroy row instances inthis.items.Config Propagation (Container Behavior Mimicry):
afterSetAppName,afterSetMounted,afterSetTheme, andafterSetWindowId.this.itemsand update the corresponding properties on the row instances, ensuring correct state propagation (theme changes, window moves, etc.).Verification:
Neo.manager.Componentmethods (down,query) still function correctly by relying on theparentIdlink.Why: To enforce API safety by hiding inapplicable container methods and to remove the overhead of unused layout/container logic in the highly performance-sensitive grid body.