Skip to content

refactor: establish DOMNodes folder feature - #326

Open
jderochervlk wants to merge 1 commit into
codex/option5-cssom-folderfrom
codex/option5-dom-nodes-folder
Open

refactor: establish DOMNodes folder feature#326
jderochervlk wants to merge 1 commit into
codex/option5-cssom-folderfrom
codex/option5-dom-nodes-folder

Conversation

@jderochervlk

@jderochervlk jderochervlk commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Tracking issue: #342

Stack context

Part 16 of the Option 5 folder-feature stack.

Review this PR as the incremental diff against #325.

Summary

  • add the target src/dom-nodes folder on the unqualified internal DOMNodes feature
  • move the recursive node/tree, range, traversal, selection, element, and DOM implementation interfaces out of the legacy broad DOM folder
  • move the small HTML.res shadow-root/serialization options module with its direct Element and ShadowRoot consumers
  • add the supported WebAPI.DOMNodes feature
  • expose the previously internal AbstractRange, Attr, CDATASection, ProcessingInstruction, and StaticRange interface modules

Dependency direction

The compiler-derived closure is:

WebAPI.DOMNodes -> WebAPI.DOMPlatform + WebAPI.Animation + WebAPI.CSSOM + WebAPI.Geometry + DOMNodes

Animation and CSSOM are required by public Element, ShadowRoot, ProcessingInstruction, and recursive DOMTree signatures. Keeping those dependencies explicit avoids module slices and produces an acyclic graph.

Temporary state

  • the qualified WebAPI.DOM source-feature collision remains until the legacy DOM folder is fully emptied
  • several node records still refer to foundational DOM.* compatibility types; final type ownership cleanup remains deferred
  • HTML.res is intentionally owned by DOMNodes because its option types are required there; the later HTML feature receives it transitively

Review focus

  • recursive DOMNodes folder membership and public interface completeness
  • the measured dependency closure
  • the placement of shared HTML serialization/shadow-root options

Verification

  • node_modules/.bin/rescript clean
  • node_modules/.bin/rescript build --prod --features DOM,Event,DOMPlatform,Animation,CSSOM,Geometry,DOMNodes
  • npm run build
  • npm test
  • npm run format:check
  • git diff --check

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8b79918593

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rescript.json
Comment thread rescript.json
@jderochervlk
jderochervlk force-pushed the codex/option5-dom-nodes-folder branch 3 times, most recently from a6e3d1b to cce8ba0 Compare August 5, 2026 12:31
@jderochervlk
jderochervlk force-pushed the codex/option5-dom-nodes-folder branch from cce8ba0 to 88bf074 Compare August 5, 2026 12:34
@jderochervlk
jderochervlk force-pushed the codex/option5-dom-nodes-folder branch 3 times, most recently from a1b8b2a to e24fc87 Compare August 5, 2026 14:00
@jderochervlk
jderochervlk force-pushed the codex/option5-dom-nodes-folder branch 2 times, most recently from 3f7450a to 81a23b6 Compare August 5, 2026 14:50
@jderochervlk
jderochervlk force-pushed the codex/option5-dom-nodes-folder branch from 81a23b6 to c680b86 Compare August 5, 2026 15:09
@jderochervlk
jderochervlk force-pushed the codex/option5-dom-nodes-folder branch from c680b86 to 2f831d3 Compare August 5, 2026 15:45
@jderochervlk
jderochervlk force-pushed the codex/option5-dom-nodes-folder branch from 2f831d3 to 20849cd Compare August 5, 2026 17:40
@jderochervlk
jderochervlk requested review from brnrdog and tsnobip August 6, 2026 14:45
@jderochervlk
jderochervlk force-pushed the codex/option5-dom-nodes-folder branch 2 times, most recently from 05b3738 to 8530bf3 Compare August 6, 2026 14:58
@jderochervlk
jderochervlk force-pushed the codex/option5-dom-nodes-folder branch from 8530bf3 to f44af83 Compare August 6, 2026 15:04
@jderochervlk
jderochervlk force-pushed the codex/option5-dom-nodes-folder branch from f44af83 to 13f452f Compare August 6, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant