feat(core): add utility for resolving defer block information to ng global#59184
feat(core): add utility for resolving defer block information to ng global#59184crisbeto wants to merge 3 commits intoangular:mainfrom
Conversation
59b1bc6 to
8c77a89
Compare
There was a problem hiding this comment.
I'm wondering if we should move this code in the packages/core/src/defer folder (for ex. packages/core/src/defer/debug.ts).
There was a problem hiding this comment.
I put it here since this is where we keep all of the window.ng code.
There was a problem hiding this comment.
Sounds good. We'd probably need to revisit this (for ex. create a separate folder for all debug-related code), but it's outside of the scope of this PR.
Removes the `prefetchTriggers` field from the `TDeferBlockDetails` since we weren't reading or writing to it anywhere.
Adds a field on the `TDeferBlockDetails` where we can track debugging information about the defer block. Also uses it to store text representation of the different triggers which can be shown to the dev tools.
8c77a89 to
f2eae0b
Compare
crisbeto
left a comment
There was a problem hiding this comment.
Feedback has been addressed.
There was a problem hiding this comment.
I put it here since this is where we keep all of the window.ng code.
AndrewKushnir
left a comment
There was a problem hiding this comment.
@crisbeto thanks for implementing this API 👍
There was a problem hiding this comment.
Sounds good. We'd probably need to revisit this (for ex. create a separate folder for all debug-related code), but it's outside of the scope of this PR.
…lobal Adds the `getDeferBlocks` function to the global `ng` namespace which returns information about all `@defer` blocks inside of a DOM node. This information can be useful either directly in the browser console or to implement future functionality in the dev tools.
f2eae0b to
f712fa7
Compare
|
This PR was merged into the repository by commit 57f3550. The changes were merged into the following branches: main |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Removes the `prefetchTriggers` field from the `TDeferBlockDetails` since we weren't reading or writing to it anywhere. PR Close angular#59184
…ngular#59184) Adds a field on the `TDeferBlockDetails` where we can track debugging information about the defer block. Also uses it to store text representation of the different triggers which can be shown to the dev tools. PR Close angular#59184
…lobal (angular#59184) Adds the `getDeferBlocks` function to the global `ng` namespace which returns information about all `@defer` blocks inside of a DOM node. This information can be useful either directly in the browser console or to implement future functionality in the dev tools. PR Close angular#59184
Adds the
getDeferBlocksfunction to the globalngnamespace which returns information about all@deferblocks inside of a DOM node. This information can be useful either directly in the browser console or to implement future functionality in the dev tools.Also includes the following supporting changes:
refactor(core): remove unused field
Removes the
prefetchTriggersfield from theTDeferBlockDetailssince we weren't reading or writing to it anywhere.refactor(core): track debugging information about deferred triggers
Adds a field on the
TDeferBlockDetailswhere we can track debugging information about the defer block. Also uses it to store text representation of the different triggers which can be shown to the dev tools.