Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make PendingTasks a stable API (no longer developer preview) #60697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Platonn opened this issue Apr 2, 2025 · 2 comments
Closed

Make PendingTasks a stable API (no longer developer preview) #60697

Platonn opened this issue Apr 2, 2025 · 2 comments

Comments

@Platonn
Copy link
Contributor

Platonn commented Apr 2, 2025

Which @angular/* package(s) are relevant/related to the feature request?

core

Description

PendingTasks class is very useful and I'd love it already to be in the stable API (no longer developer preview).

Usecase:
I'd like to inform Angular that it should wait for my specific custom tasks until Angular considers the app to be stable. It will help me to avoid Layout Shift because of too-early cleanup of dehydrated DOM.

In particular, while optimizing TBT Web Vital of my app, and when using RxFor directive (from @rx-angular/template library) to split long initial rendering (when CSR kicks in after getting SSR HTML) I experienced a problem - Angular considered the app as stable and removed parts of the DOM of the SSR HTML while RxFor directive was still busy in rendering asynchronously sub-components in separate macro tasks (to optimize TBT).

For more see, the issue in rx-angular repo: rx-angular/rx-angular#1867

For the rx-angular library to fix the issue, I believe they would like to use only a stable Angular API - PendingTasks. But until it's in developer preview phase, it's risky to use this Angular API in their source code, becasue this API might change any time.

Proposed solution

Remove @developerPreview marker from the source code and update documentation.

Alternatives considered

To my limited knowledge, there is no other workaround method to inform Angular that it should wait for my custom tasks until the app is considered stable. Perhaps I'm missing something obvious - then please let me know. :)

@JeanMeche
Copy link
Member

We like that API too !

We're looking forward to make stable once we have enough confidence about it's shape and features.
To help us toward this, we appreciate any feedback.

@JeanMeche JeanMeche closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2025
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants