Skip to content
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

feat(core): add afterRender and afterNextRender #50607

Closed
wants to merge 1 commit into from

Conversation

devknoll
Copy link
Contributor

@devknoll devknoll commented Jun 7, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Jun 7, 2023
packages/core/src/after_render_hooks.ts Outdated Show resolved Hide resolved
packages/core/src/after_render_hooks.ts Outdated Show resolved Hide resolved
packages/core/src/application_ref.ts Outdated Show resolved Hide resolved
packages/core/src/application_ref.ts Outdated Show resolved Hide resolved
packages/core/src/application_ref.ts Outdated Show resolved Hide resolved
@devknoll devknoll force-pushed the x-after-render-hook branch 14 times, most recently from 701205b to 07fd41f Compare June 20, 2023 14:56
@devknoll

This comment was marked as outdated.

@devknoll devknoll force-pushed the x-after-render-hook branch 5 times, most recently from 294db1b to 76fb2e5 Compare June 29, 2023 18:48
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

@devknoll thanks for the updates (I've just left a few comments) 👍

Another questions/items worth considering:

  • we should consider running performance tests, since we are adding code to the "hot" code path
  • we need to finalize function names and what those functions return
  • we can also discuss how to make the implementation tree-shakable (since it has a bit more code now), i.e. don't include the AfterRenderHooksManager code unless the afterRender or afterNextRender function is used
  • it'd be great to put together some tests into hydration spec and assert that the lifecycle hook is being invoked once hydration is completed

packages/core/src/render3/after_render_hooks.ts Outdated Show resolved Hide resolved
packages/core/src/render3/after_render_hooks.ts Outdated Show resolved Hide resolved
packages/core/src/render3/component_ref.ts Outdated Show resolved Hide resolved
goldens/public-api/core/index.md Outdated Show resolved Hide resolved
@kara kara requested a review from a team June 30, 2023 17:41
@devknoll devknoll force-pushed the x-after-render-hook branch 2 times, most recently from ae8aa78 to baef737 Compare July 10, 2023 17:33
@pullapprove pullapprove bot requested a review from jessicajaniuk July 28, 2023 01:50
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

Reviewed-for: public-api

@AndrewKushnir AndrewKushnir added the target: minor This PR is targeted for the next minor release label Jul 28, 2023
Copy link
Contributor

@jessicajaniuk jessicajaniuk left a comment

Choose a reason for hiding this comment

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

reviewed-for: public-api

@jessicajaniuk jessicajaniuk requested review from alxhub and removed request for pkozlowski-opensource, alxhub and a team July 31, 2023 14:26
Add and expose the after*Render functions as developer preview
@AndrewKushnir
Copy link
Contributor

Presubmit.

@AndrewKushnir
Copy link
Contributor

Caretaker notes:

  • the presubmit is "green" (only pre-existing and flaky tests failures)
  • we've discussed the public API with @alxhub and the changes have been made to address the feedback

This PR is now ready for merge.

@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Aug 1, 2023
@alxhub
Copy link
Member

alxhub commented Aug 1, 2023

This PR was merged into the repository by commit e53d4ec.

@alxhub alxhub closed this in e53d4ec Aug 1, 2023
thomasturrell pushed a commit to thomasturrell/angular that referenced this pull request Aug 29, 2023
Add and expose the after*Render functions as developer preview

PR Close angular#50607
@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 Sep 1, 2023
@devknoll devknoll deleted the x-after-render-hook branch September 1, 2023 02:39
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
Add and expose the after*Render functions as developer preview

PR Close angular#50607
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime core: lifecycle hooks detected: feature PR contains a feature commit merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants