-
Notifications
You must be signed in to change notification settings - Fork 26.6k
feat(devtools): clean up router tree for stable release #63081
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
base: main
Are you sure you want to change the base?
feat(devtools): clean up router tree for stable release #63081
Conversation
7af49a9
to
0be47a7
Compare
devtools/projects/ng-devtools-backend/src/lib/client-event-subscribers.ts
Outdated
Show resolved
Hide resolved
import {TestBed} from '@angular/core/testing'; | ||
import {Router, RouterModule} from '../index'; | ||
import {getLoadedRoutes} from '../src/router_devtools'; | ||
import {getLoadedRoutes, getRouterInstance, navigateByUrl} from '../src/router_devtools'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider: Could we improve this by testing the published ng
global rather than directly importing the symbols? What if we called provideRouter
and then called ng.*
and validated that result?
devtools/projects/ng-devtools/src/lib/devtools-tabs/router-tree/route-details-row.component.ts
Outdated
Show resolved
Hide resolved
devtools/projects/ng-devtools/src/lib/devtools-tabs/router-tree/route-details-row.component.ts
Outdated
Show resolved
Hide resolved
devtools/projects/ng-devtools/src/lib/devtools-tabs/router-tree/route-details-row.component.ts
Show resolved
Hide resolved
92d9188
to
fe2d6e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@AleksanderBodurri just a heads up that this PR is having all sorts of github / pullapprove issues. I can't remove Paul's review request or my own. Pullapprove is erroring. So for now just leave the |
9a0943d
to
f079e15
Compare
af16fca
to
f8ff794
Compare
f8ff794
to
f20b5b5
Compare
<div class="unsupported-version"> | ||
<p> | ||
Router tree visualization is available for Angular applications using version 21 and greater. | ||
Please upgrade your application to Angular version 21 or above to use this feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stable launch for this might be decoupled from v21, this message is also a bit confusing right now given that v21 doesn't exist yet.
I'm thinking we could either:
- Say "latest 20.2.x release", so it's not too tied to a specific patch version.
- Use the earliest patch we know works right now, and then consider bumping it to v21 later as we get closer to that launch date.
21f1ad6
to
a7db19f
Compare
Addresses some cleanup items for the router tree: - No longer loads router ng global APIs as a side effect of importing the router. Rather this is now a runtime step that occurs when provideRouter is called. - No longer depends on router.navigateByUrl in Angular DevTools. There is now a dedicated global util for this - Router instance logic no longer depends on token name - Prevents navigating to lazy or redirect routes (these don't have an associated component)
a7db19f
to
06868bf
Compare
@AleksanderBodurri does this actually need to go in patch? I ask because its a "feat" and also doesn't merge cleanly into the patch branch |
I want to say not 100% necessary. It would be nice to get the framework changes into a patch version for 20.2.x but not strictly required. @dgp1130 any thoughts? |
Addresses some cleanup items for the router tree: