Skip to content

[Zoneless] Audit asynchronous APIs for zoneless compatibility #17380

Description

@mddragnev

Audit asynchronous APIs for zoneless compatibility

When migrating the library to zoneless change detection, we should review every usage of setTimeout and requestAnimationFrame.

Unlike applications using Zone.js, zoneless change detection is not automatically triggered after these callbacks execute. Each occurrence should be evaluated to determine whether it:

  • requires an explicit change detection trigger,
  • is safe to leave as-is because it does not affect the view.

setTimeout

  • Chips area
  • Drag & Drop directive
  • Notification directive
  • Tooltip
  • List item
  • ProgressBar
  • Query Builder
  • Query Builder tree
  • Tree navigation service

requestAnimationFrame

  • Month Picker
  • Carousel
  • Overlay
  • Dialog
  • Focus directive
  • ForOf base helper
  • Notification service
  • Scroll inertia
  • Text selection directive
  • Grid filtering row
  • ESF components
  • Grid filtering service
  • Resizer service
  • Grid base directive
  • Pivot Grid
  • Tree Grid
  • Navigation Drawer
  • Query Builder tree
  • Tabs
  • Time Picker
  • Tree selection service
  • Tree component

Other APIs to review

While setTimeout and requestAnimationFrame are the most common cases, it is also worth reviewing usages of:

  • setInterval
  • queueMicrotask
  • Promise.then() / async/await callbacks that update component state
  • requestIdleCallback
  • ResizeObserver
  • MutationObserver
  • IntersectionObserver
  • Native event listeners registered outside Angular (e.g. addEventListener)
  • Third-party libraries that invoke callbacks outside Angular's rendering lifecycle

Metadata

Metadata

Assignees

Type

Fields

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions