LearnNewsExamplesServices
Frontmatter
id9489
titleGrid Multi-Body: Decoupled Horizontal Scroller & Main Thread Sync
stateClosed
labels
enhancementaigrid
assigneestobiu
createdAtMar 16, 2026, 7:16 PM
updatedAtMar 31, 2026, 5:02 PM
githubUrlhttps://github.com/neomjs/neo/issues/9489
authortobiu
commentsCount1
parentIssue9486
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 31, 2026, 5:02 PM

Grid Multi-Body: Decoupled Horizontal Scroller & Main Thread Sync

Closedenhancementaigrid
tobiu
tobiu commented on Mar 16, 2026, 7:16 PM

Phase 3 of the Multi-Body Epic (#9486).

To guarantee zero vertical jitter, the V2 architecture places the Center SubGrid inside an outer wrapper that handles vertical scrolling. This pushes the native horizontal scrollbar of the Center SubGrid to the absolute bottom of the virtualized data (e.g., 500,000px down), making it unusable.

We must build a decoupled, "fake" horizontal scrollbar that stays pinned to the bottom of the visible grid viewport.

Requirements:

  1. Neo.grid.HorizontalScroller Component:
    • Create a new component that renders a native horizontal scrollbar but contains no actual data.
    • DOM structure concept: <div style="overflow-x: auto"><div style="width: {TotalCenterColumnsWidth}px"></div></div>
    • Position it as a sibling to the grid.Container body wrapper (e.g., just above the Footer Toolbar).
  2. Main Thread Addon (GridHorizontalScrollSync):
    • Create a new Main Thread Addon to handle the high-frequency syncing.
    • It must register the DOM node of the HorizontalScroller and the DOM nodes of the Center SubGrid and Center Header.
    • It must attach a scroll listener to the fake scroller.
    • On scroll, it must synchronously execute centerSubGridNode.scrollLeft = scrollLeft and centerHeaderNode.scrollLeft = scrollLeft.
  3. Visibility Logic:
    • The HorizontalScroller should only render/be visible if the Center SubGrid actually requires horizontal scrolling (i.e., total center column width > available center viewport width).
tobiu added the enhancement label on Mar 16, 2026, 7:16 PM
tobiu added the ai label on Mar 16, 2026, 7:16 PM
tobiu added the grid label on Mar 16, 2026, 7:16 PM
tobiu added parent issue #9486 on Mar 16, 2026, 7:16 PM
tobiu assigned to @tobiu on Mar 17, 2026, 7:59 PM
tobiu
tobiu Mar 31, 2026, 5:02 PM

Resolved. The decoupled horizontal scroller has been structurally integrated alongside the multi-body wrapper architecture, and the GridHorizontalScrollSync Main Thread Addon has been refactored to translate its scrolling output to both the bodyCenter and the headerCenter. Furthermore, trackpad physics (wheel events) and drag-to-scroll functionalities have been seamlessly bridged back to the new architecture via #9613.

tobiu closed this issue on Mar 31, 2026, 5:02 PM