-
Notifications
You must be signed in to change notification settings - Fork 26.4k
refactor(devtools): abstract and reuse the tree visualizer #62264
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1d7c4bb
to
5c18f74
Compare
5c18f74
to
1c08a7b
Compare
Abstract the injector tree visualizer so it can be used for both the Injector Tree and Router Tree tabs without having to rely on separate identical implementations.
1c08a7b
to
fd365a8
Compare
dgp1130
approved these changes
Jun 27, 2025
This PR was merged into the repository by commit 3eec4ba. The changes were merged into the following branches: main |
hawkgs
added a commit
to hawkgs/angular
that referenced
this pull request
Jun 30, 2025
Fixes a regression from angular#62264
hawkgs
added a commit
to hawkgs/angular
that referenced
this pull request
Jun 30, 2025
Fixes a regression from angular#62264
hawkgs
added a commit
to hawkgs/angular
that referenced
this pull request
Jun 30, 2025
Fixes a regression from angular#62264
4 tasks
hawkgs
added a commit
to hawkgs/angular
that referenced
this pull request
Jun 30, 2025
Fixes a regression from angular#62264
thePunderWoman
pushed a commit
that referenced
this pull request
Jul 1, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
action: merge
The PR is ready for merge by the caretaker
area: devtools
target: minor
This PR is targeted for the next minor release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Abstract the injector tree visualizer so it can be used for both the Injector Tree and Router Tree tabs without having to rely on separate identical implementations.
Changes
In essence, there is now a single class called
TreeVisualizer
that works withTreeNode
s. ATreeNode
should have alabel
andTreeNode
children
. If the tree visualizer user items do not satisfy this format, they should be transformed. TheTreeVisualizer
exposes two additional config options – the node and link modifiers – that can be used for applying any instance-specific changes to the SVG elements (e.g. classes, data attributes, etc.). The implementation of the tree visualizer is almost unchanged.Motivation
#62048 – such fixes and improvements require syncing the injector tree and router tree implementations.
Future improvements
Since we now have a single tree visualizer, it makes sense to integrate it in the
tree-visualizer-host
component via composition. The API will be exposed as part of the component and won't require manually tying the host and the visualizer.