LearnNewsExamplesServices
Frontmatter
id9872
titleGrid Multi-Body: 3-Tier Component Orchestration and Architecture Refactoring
stateOpen
labels
enhancementaigrid
assignees[]
createdAtApr 10, 2026, 8:19 PM
updatedAtApr 10, 2026, 8:19 PM
githubUrlhttps://github.com/neomjs/neo/issues/9872
authortobiu
commentsCount0
parentIssue9486
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]

Grid Multi-Body: 3-Tier Component Orchestration and Architecture Refactoring

Openenhancementaigrid
tobiu
tobiu commented on Apr 10, 2026, 8:19 PM

The Problem: The "God Object" Pattern

Currently, Neo.grid.Container carries the burden of manually instantiating headerStart, bodyStart, and related split components. It forcibly injects them into the view hierarchy and manages low-level column iteration parameters. This violates the Single Responsibility Principle, creates immense VDOM diff penalties across unrelated domains (especially for Selection Models), and creates brittle this.items synchronization.

The Solution: The 3-Tier Orchestration Architecture

To support the Multi-Body split cleanly and prepare the foundation for centralized Selection Models (unblocking #9492), the instantiation logic must be pushed downwards:

  1. Neo.grid.Container (Macro Routing):

    • Stripped down into a pure macro layout coordinator.
    • Distributes columns parameters downwards but drops manual SubGrid instantiation from createOrUpdateSubGrids().
  2. Neo.grid.header.Wrapper (New Orchestrator):

    • A dedicated wrapper (upgraded from a generic BaseContainer) that is strictly responsible for managing headerStart, headerToolbar, and headerEnd.
  3. Neo.grid.View (The State Master):

    • Transitioned into the master body orchestrator.
    • Strictly responsible for the creation, lifecycle, and row-synchronization (syncBodies) of bodyStart, body, and bodyEnd.

Architectural Guarantee

This isolates all physical row logic perfectly beneath grid.View, enabling it to safely host the SelectionModel in the future without triggering header layout thrashing.

tobiu added the enhancement label on Apr 10, 2026, 8:19 PM
tobiu added the ai label on Apr 10, 2026, 8:19 PM
tobiu added the grid label on Apr 10, 2026, 8:19 PM
tobiu added parent issue #9486 on Apr 10, 2026, 8:19 PM
tobiu cross-referenced by #9868 on Apr 10, 2026, 8:19 PM