feat(devtools): clean up router tree for stable release#63081
feat(devtools): clean up router tree for stable release#63081AleksanderBodurri wants to merge 1 commit intoangular:mainfrom
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.
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
|
@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.
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? |
|
I'll go ahead and merge this one, feel free to open a new PR to the 20.2.x branch if we want to land some of the changes there as well |
|
This PR was merged into the repository. The changes were merged into the following branches:
|
|
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. |
Addresses some cleanup items for the router tree: