Skip to content

feat(core): add scrollMargin to @defer viewport options - #70187

Open
SkyZeroZx wants to merge 1 commit into
angular:mainfrom
SkyZeroZx:feat-viewport-scrollMargin
Open

feat(core): add scrollMargin to @defer viewport options#70187
SkyZeroZx wants to merge 1 commit into
angular:mainfrom
SkyZeroZx:feat-viewport-scrollMargin

Conversation

@SkyZeroZx

Copy link
Copy Markdown
Contributor

Allow scrollMargin to be configured for @defer viewport, prefetch, and hydrate triggers.

Unlike rootMargin, scrollMargin expands the clipping bounds of nested scroll containers. This allows deferred content to be loaded or prefetched before it enters the visible area of a nested scroller.

Include scrollMargin in the IntersectionObserver cache key so viewport triggers with different margins use the correct observer configuration.

Allow `scrollMargin` to be configured for `@defer` viewport, prefetch, and
hydrate triggers.

Unlike `rootMargin`, `scrollMargin` expands the clipping bounds of nested scroll
containers. This allows deferred content to be loaded or prefetched before it
enters the visible area of a nested scroller.

Include `scrollMargin` in the IntersectionObserver cache key so viewport
triggers with different margins use the correct observer configuration.
@angular-robot angular-robot Bot added detected: feature PR contains a feature commit area: core Issues related to the framework runtime requires: TGP This PR requires a passing TGP before merging is allowed labels Aug 13, 2026
@ngbot ngbot Bot added this to the Backlog milestone Aug 13, 2026
@SkyZeroZx
SkyZeroZx marked this pull request as ready for review August 13, 2026 21:57
@SkyZeroZx
SkyZeroZx marked this pull request as draft August 13, 2026 21:58
@SkyZeroZx
SkyZeroZx marked this pull request as ready for review August 13, 2026 21:58
@JeanMeche
JeanMeche requested a review from crisbeto August 14, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Issues related to the framework runtime detected: feature PR contains a feature commit requires: TGP This PR requires a passing TGP before merging is allowed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant