LearnNewsExamplesServices
Frontmatter
id9008
titleRefactor DevRank Grid components to use dedicated classes
stateClosed
labels
airefactoring
assigneestobiu
createdAtFeb 6, 2026, 1:35 AM
updatedAtFeb 6, 2026, 1:41 AM
githubUrlhttps://github.com/neomjs/neo/issues/9008
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 6, 2026, 1:41 AM

Refactor DevRank Grid components to use dedicated classes

Closed v12.0.0 airefactoring
tobiu
tobiu commented on Feb 6, 2026, 1:35 AM

The current implementation of the User and Location columns in apps/devrank/view/GridContainer.mjs uses an anti-pattern where the component config function returns a raw vdom object. This leads to component.set({vdom: ...}) calls, which are problematic (stale state, ID loss).

The goal is to refactor these into dedicated component classes (UserCell, LocationCell) that manage their own VDOM updates reactively based on input configs. This will fix the stale rendering issues and align with proper Neo.mjs architectural patterns.

Tasks:

  1. Revert debug logs in src/grid/column/Component.mjs.
  2. Create apps/devrank/view/cell/UserCell.mjs.
  3. Create apps/devrank/view/cell/LocationCell.mjs.
  4. Update apps/devrank/view/GridContainer.mjs to use these new components.
tobiu added the ai label on Feb 6, 2026, 1:36 AM
tobiu added the refactoring label on Feb 6, 2026, 1:36 AM
tobiu assigned to @tobiu on Feb 6, 2026, 1:40 AM
tobiu referenced in commit 884a5ca - "refactor(devrank): Replace inline VDOM components with reactive Cell classes (#9008)" on Feb 6, 2026, 1:41 AM
tobiu
tobiu Feb 6, 2026, 1:41 AM

Input from Gemini 3 Pro:

✦ Refactoring complete.

I have replaced the inline component definitions in apps/devrank/view/GridContainer.mjs with dedicated component classes:

  • apps/devrank/view/cell/UserCell.mjs
  • apps/devrank/view/cell/LocationCell.mjs

These components accept a record config and update their VDOM internally using afterSetRecord, ensuring that:

  1. vdom is never passed to set(), avoiding the stale state issue.
  2. Component IDs and internal state are preserved during updates.
  3. Updates are reactive and efficient.

The GridContainer code is now cleaner and follows best practices.

tobiu closed this issue on Feb 6, 2026, 1:41 AM