Skip to content

docs(http): document observer root semantics for scroll/visible triggers - #73

Merged
ErickXavier merged 2 commits into
mainfrom
docs/72-observer-root
Aug 4, 2026
Merged

docs(http): document observer root semantics for scroll/visible triggers#73
ErickXavier merged 2 commits into
mainfrom
docs/72-observer-root

Conversation

@ErickXavier

Copy link
Copy Markdown
Collaborator

Summary

Documents the IntersectionObserver root resolution behavior for all three observers in the get/pagination system:

  • get-trigger="scroll" sentinel observer (http.js L824-835)
  • get-trigger="visible" observer (http.js L882-894)
  • Initial-request observer for scroll-without-insert (http.js L910-921)

All three call _findScrollContainer(el) (http.js L49-57), which walks up the DOM checking computed overflow-y for auto or scroll, falling back to document.documentElement. The result is passed as the IntersectionObserver root (documentElement maps to null = viewport).

Changes

  • references/directives/http.md: Fixed "viewport" references in the get-trigger table to say "scroll container". Added Observer root and Fill-until-overflow notes in the get-threshold section explaining the root resolution and the fill-until-overflow behavior. Updated example comment.
  • SKILL.md: Added one-line mention of observer root semantics and fill-until-overflow to the Pagination summary line.

Verification

  • Claims verified against NoJS/src/directives/http.js lines 49-57, 824-835, 882-894, 910-921.
  • No stale "viewport-rooted" descriptions remain (grep confirmed).

Refs #72

Merge is held for the maintainer.

The IntersectionObservers for get-trigger="scroll", get-trigger="visible",
and the initial-request observer resolve the nearest scrollable ancestor
(overflow-y: auto|scroll) as observer root, falling back to the viewport.
Document this behavior and the fill-until-overflow semantics in
references/directives/http.md and SKILL.md.

@ErickXavier ErickXavier left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Verified documentation claims against NoJS/src/directives/http.js:

  • _findScrollContainer semantics (overflow-y walk, documentElement fallback)
  • Observer root mapping (documentElement to null for viewport)
  • All three observer call sites use _findScrollContainer
  • Fill-until-overflow behavior description
  • Commit message format, branch naming, no attribution trailers, no version bump

… wording

Update data-fetching.md: replace three stale "viewport" references with
scroll-container semantics, add cross-reference to http.md get-threshold
section. Adjust http.md observer-root paragraph to clarify the
scroll-without-insert path is a fallback, not a third coequal observer.
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