Repository navigation
Conversation
Add a Mermaid flowchart to the "Common router events" section that shows the order of the router events and where a navigation can end early (NavigationSkipped, NavigationCancel, NavigationError). Add opt-in, theme-aware flowchart styles that follow the existing Gantt chart look (tinted fills, accent borders, rounded corners, no shadow), using only existing color variables, and give edge labels the page background so they read well in both light and dark mode.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Deployed adev-preview for af17077 to: https://ng-dev-previews-fw--pr-angular-angular-72291-adev-prev-suc4j737.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
|
This is one of the cases where I think a chart brings little value. This is indeed shows event order for a top level navigation but doesn't represent real-life scenarios. Thanks anyway. |
Add a Mermaid flowchart to the "Common router events" section that shows the order of the router events and where a navigation can end early (NavigationSkipped, NavigationCancel, NavigationError).
Add opt-in, theme-aware flowchart styles that follow the existing Gantt chart look (tinted fills, accent borders, rounded corners, no shadow), using only existing color variables, and give edge labels the page background so they read well in both light and dark mode.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The "Common router events" section of the Router Lifecycle and Events guide lists the events in two tables, but there is no visual showing their order or where a navigation can end early.
Issue Number: Part of #72252
What is the new behavior?
Adds a Mermaid flowchart under the event tables that shows:
NavigationStart→RoutesRecognized→GuardsCheckStart→GuardsCheckEnd→ResolveStart→ResolveEnd→NavigationEndNavigationSkippedas a separate path that happens instead ofNavigationStart(same URL, ignored)NavigationCancelandNavigationErrorleaving the in-progress steps, since both can happen at any stepA short paragraph below the diagram explains what causes a cancel (a guard returns
false, a guard or resolver redirects, or a newer navigation starts) and what causes an error.The diagram uses new opt-in classes in
_mermaid.scssthat follow the existing Gantt chart look: a tinted fill, an accent border, rounded corners and no shadow. They use only existing color variables, so they adapt to light and dark mode.Does this PR introduce a breaking change?
Other information
stepNode,entryNode,successNode,warningNode,errorNode,mutedNode, andgroupBoxfor subgraphs), so existing diagrams are unchanged.