Skip to content

Feat: Implement hideMode for Grid Columns to support OffscreenCanvas buffering #8959

@tobiu

Description

@tobiu

We need to implement a buffering strategy for Grid Columns to support cases like OffscreenCanvas where removing the DOM node destroys the worker connection context.

Proposed Changes:

  1. src/grid/column/Base.mjs:

    • Add hideMode config (String, default: 'removeDom').
    • Valid values: 'removeDom', 'visibility' (uses visibility: hidden), 'display' (uses display: none).
    • Note: visibility is preferred for Canvas to maintain layout geometry.
  2. src/grid/Body.mjs:

    • Update rendering logic (createRow) to ensure columns with hideMode !== 'removeDom' are always rendered in the VDOM, regardless of whether they are within the mountedColumns window.
    • If such a column is outside the mounted range, it will be rendered with the appropriate hiding style.

Benefits:

  • Solves the "Zombie Canvas" issue where horizontally scrolling destroys OffscreenCanvas connections.
  • Improves scrolling performance for heavy column components by avoiding reconstruction.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions