docs(docs-infra): preserve navigation origin when clicking cross-category links#68023
Open
erkamyaman wants to merge 1 commit intoangular:mainfrom
Open
docs(docs-infra): preserve navigation origin when clicking cross-category links#68023erkamyaman wants to merge 1 commit intoangular:mainfrom
erkamyaman wants to merge 1 commit intoangular:mainfrom
Conversation
Member
|
Can you make to make that change a single |
cdc32b9 to
e807223
Compare
Contributor
Author
Done! Thank you |
|
Deployed adev-preview for 0f1c3e8 to: https://ng-dev-previews-fw--pr-angular-angular-68023-adev-prev-lpj2n820.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
e807223 to
e1138d0
Compare
…gory links When a sidebar item links to a page in a different category (e.g., Route transition animations under Animations links to a Routing page), clicking back navigates to the main menu instead of the originating category. Store the originating category in NavigationState when clicking a cross-referenced item, so the back button returns to the correct section.
e1138d0 to
0f1c3e8
Compare
Contributor
Author
|
Added missing crossCategoryOrigin signal to FakeNavigationListState to match the updated NavigationState service. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
docs(docs-infra): preserve navigation origin when clicking cross-category links
When a sidebar item links to a page in a different category (e.g., "Route transition animations" under Animations links to a Routing page), clicking back navigates to the main menu instead of the originating category.
Store the originating category in NavigationState when clicking a cross-referenced item, so the back button returns to the correct section.
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?
When navigating to a cross-category link in the docs sidebar (e.g., clicking
"Route transition animations" under Animations, which routes to a Routing
page), the sidebar switches to the Routing section. Pressing the back arrow
navigates to the main menu instead of returning to Animations.
The same issue affects "Testing routing and navigation" under Testing, which
routes to a Routing page.
Screen.Recording.2026-04-03.at.21.56.54.mov
Issue Number: N/A
What is the new behavior?
Clicking back returns to the originating category. A
crossCategoryOriginsignal in
NavigationStatestores the parent section when a cross-referenceditem is clicked. The back button checks this signal and navigates to the
stored origin instead of the main menu.
Items that link across categories are marked with
isCrossReferenced: truein the navigation data.
Screen.Recording.2026-04-03.at.22.13.29.mov
Does this PR introduce a breaking change?
Other information
Affected files:
NavigationIteminterface — addedisCrossReferencedpropertyNavigationStateservice — addedcrossCategoryOriginsignalNavigationListcomponent — back button and link click logic