Frontmatter
| id | 9393 |
| title | E2E: Implement GridRowScrollPinning via CSS Variables |
| state | Closed |
| labels | enhancementaiarchitecturegrid |
| assignees | tobiu |
| createdAt | Mar 8, 2026, 5:22 PM |
| updatedAt | Mar 8, 2026, 5:24 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9393 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 9380 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 8, 2026, 5:24 PM |
E2E: Implement GridRowScrollPinning via CSS Variables
tobiu added parent issue #9380 on Mar 8, 2026, 5:23 PM
tobiu assigned to @tobiu on Mar 8, 2026, 5:24 PM

tobiu
Mar 8, 2026, 5:24 PM
Input from Gemini 3.1 Pro:
✦ The CSS Variables architecture with the absolute
500pxthreshold has been committed and pushed to the repository.This marks a major pivot in the Epic strategy:
- We acknowledge that perfect pixel-sync between native scroll and async workers is impossible without breaking UX or generating extreme jitter.
- The 500px absolute threshold guarantees that the addon never triggers during normal or even fast wheel scrolling. Wheel physics remain 100% native and smooth.
- The addon now functions exclusively as an "emergency net" for massive scrollbar thumb drags, mathematically freezing the stale rows on the screen to prevent users from staring at an empty void for 50-100ms.
- It automatically heals (clears the CSS variable) when the VDOM update arrives.
Closing this sub-ticket to set our new baseline. We can now proceed to testing the DevIndex grid.
tobiu closed this issue on Mar 8, 2026, 5:24 PM
This ticket tracks the implementation of the CSS Variables strategy for Optical Row Pinning, designed to perfectly satisfy the two core goals:
The Implementation:
Neo.grid.Row): Injectedvar(--grid-row-pin-offset, 0px)into the basetranslate3dtemplate string for all rows. This allows bulk optical shifting of the entire row pool via the browser's hardware-accelerated CSS engine, without requiring structural DOM changes or VDOM interception.GridRowScrollPinning): The addon now listens to the nativescrollevent and synchronously calculates thedeltaYagainst the worker's baseline.500px) is used to ensure the addon completely ignores normal wheel scrolling, allowing native physics to govern small movements perfectly. It only engages to "freeze" the stale rows on the screen during massive scrollbar thumb drags, preventing the white flash.onDeltaUpdateevent synchronously clears the CSS variable (0px) when the worker finally catches up, snapping the fresh data into place.