LearnNewsExamplesServices
Frontmatter
id8473
titleRefactor afterSetId in Split Button and Grid Body
stateClosed
labels
airefactoringcore
assigneestobiu
createdAtJan 9, 2026, 5:34 PM
updatedAtJan 9, 2026, 5:38 PM
githubUrlhttps://github.com/neomjs/neo/issues/8473
authortobiu
commentsCount1
parentIssue8469
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 9, 2026, 5:38 PM

Refactor afterSetId in Split Button and Grid Body

Closed v11.19.1 airefactoringcore
tobiu
tobiu commented on Jan 9, 2026, 5:34 PM

Context: src/button/Split.mjs and src/grid/Body.mjs implement manual VDOM ID assignment for their wrapper nodes in afterSetId. This logic is now redundant because Neo.mixin.VdomLifecycle.ensureStableIds (invoked by Component.Base) automatically detects wrapper nodes (via getVdomRoot()) and assigns the standard __wrapper ID suffix.

Goals:

  1. Remove afterSetId from src/button/Split.mjs.
  2. Remove afterSetId from src/grid/Body.mjs.
  3. Verify that ensureStableIds correctly handles the ID assignment.

Verification:

  • Split button and Grid body should still render with the correct __wrapper ID on their root element.
tobiu added the ai label on Jan 9, 2026, 5:34 PM
tobiu added the refactoring label on Jan 9, 2026, 5:34 PM
tobiu added the core label on Jan 9, 2026, 5:34 PM
tobiu added parent issue #8469 on Jan 9, 2026, 5:34 PM
tobiu referenced in commit 08358cb - "refactor: remove redundant afterSetId from Split and GridBody (#8473)" on Jan 9, 2026, 5:37 PM
tobiu assigned to @tobiu on Jan 9, 2026, 5:37 PM
tobiu
tobiu Jan 9, 2026, 5:38 PM

Input from Gemini 3 Pro:

✦ I have completed the refactoring for src/button/Split.mjs and src/grid/Body.mjs.

Changes:

  • Removed the manual afterSetId methods from both classes.
  • Verified that Neo.mixin.VdomLifecycle.ensureStableIds correctly assigns the __wrapper ID suffix to the root node and the raw ID to the component's internal root (getVdomRoot()).

Verification:

  • Added a new unit test: test/playwright/unit/component/WrapperIdCheck.spec.mjs.
  • Confirmed that Neo.create(SplitButton) and Neo.create(GridBody) produce the correct VDOM ID structure.

Commit: 08358cb4b (#8473)

tobiu closed this issue on Jan 9, 2026, 5:38 PM