Skip to content

refactor(devtools): add matcher and runGuardsAndResolvers support in …#65090

Merged
thePunderWoman merged 1 commit into
angular:mainfrom
SkyZeroZx:devtools-more-optionsRouter
Nov 18, 2025
Merged

refactor(devtools): add matcher and runGuardsAndResolvers support in …#65090
thePunderWoman merged 1 commit into
angular:mainfrom
SkyZeroZx:devtools-more-optionsRouter

Conversation

@SkyZeroZx

@SkyZeroZx SkyZeroZx commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

…router viewer

Enhance the Angular DevTools router viewer to display routes that use custom matcher functions and reflect the runGuardsAndResolvers configuration

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.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

image image

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Question :
When a matcher is used, the path property is not allowed. However, in the router viewer, it currently displays as /undefined.
We should consider replacing /undefined with a more descriptive label.
image

@pullapprove pullapprove Bot requested a review from dgp1130 November 11, 2025 23:25
@ngbot ngbot Bot added this to the Backlog milestone Nov 11, 2025
@JeanMeche

Copy link
Copy Markdown
Member

#64938 isn't even merged, that changes is too premature ATM.

@JeanMeche JeanMeche requested review from AleksanderBodurri and removed request for dgp1130 November 11, 2025 23:36
@SkyZeroZx

Copy link
Copy Markdown
Contributor Author

#64938 isn't even merged, that changes is too premature ATM.

As I understand it, runGuardsAndResolvers (which currently supports a function with from and to RunGuardsAndResolvers ) has existed for a while, just like matcher.
The DevTools simply expose its metadata to make it easier to inspect in the router viewer.
The PR (from what I briefly reviewed) adds DI support for runGuardsAndResolvers functions, which remains backward-compatible with the existing behavior.

@JeanMeche

Copy link
Copy Markdown
Member

I shouldn't be reviewing PRs so late, you're right.

@hawkgs

hawkgs commented Nov 13, 2025

Copy link
Copy Markdown
Member

Will take over the review since Alex is not available.

@hawkgs hawkgs requested review from hawkgs and removed request for AleksanderBodurri November 13, 2025 16:33
@SkyZeroZx SkyZeroZx force-pushed the devtools-more-optionsRouter branch from fb98b66 to 1554f3a Compare November 14, 2025 00:03
@hawkgs

hawkgs commented Nov 14, 2025

Copy link
Copy Markdown
Member

Question :
When a matcher is used, the path property is not allowed. However, in the router viewer, it currently displays as /undefined.
We should consider replacing /undefined with a more descriptive label.

Yeah, that's something that we should handle.

@SkyZeroZx

SkyZeroZx commented Nov 14, 2025

Copy link
Copy Markdown
Contributor Author

Question :
When a matcher is used, the path property is not allowed. However, in the router viewer, it currently displays as /undefined.
We should consider replacing /undefined with a more descriptive label.

Yeah, that's something that we should handle.

I think something like this is useful to indicate that when using a matcher or other router details, the [Matcher] should be used if it exists ( property ) .
Avoid relying on the function’s name, because inline functions may not have one. ( And [Function] it's too generic )

image

@SkyZeroZx SkyZeroZx force-pushed the devtools-more-optionsRouter branch 2 times, most recently from 4cd7002 to 86dff60 Compare November 14, 2025 18:41
@hawkgs

hawkgs commented Nov 17, 2025

Copy link
Copy Markdown
Member

Yeah, let's have [Matcher]. It will definitely be better than undefined. It might look a bit odd when "show full paths" is enabled, but I don't think there are other quick and better alternatives at this stage.

@hawkgs

hawkgs commented Nov 17, 2025

Copy link
Copy Markdown
Member

@SkyZeroZx, we'll need a rebase since there is a conflict. Other than that, LGTM 👍

@hawkgs hawkgs added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Nov 17, 2025
@SkyZeroZx SkyZeroZx force-pushed the devtools-more-optionsRouter branch from 86dff60 to 88fa8a4 Compare November 17, 2025 17:14
…router viewer

Enhance the Angular DevTools router viewer to display routes that use custom `matcher` functions and reflect the `runGuardsAndResolvers` configuration
@SkyZeroZx SkyZeroZx force-pushed the devtools-more-optionsRouter branch from 88fa8a4 to 73796a9 Compare November 17, 2025 17:18
@hawkgs hawkgs added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Nov 18, 2025
@thePunderWoman thePunderWoman merged commit ed0647d into angular:main Nov 18, 2025
22 checks passed
@thePunderWoman

Copy link
Copy Markdown
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

@angular-automatic-lock-bot

Copy link
Copy Markdown

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 Dec 19, 2025
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: devtools target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants