Add breadcrumbItems to menuData for custom breadcrumb rendering#704
Draft
kaevee wants to merge 1 commit intomoqui:masterfrom
Draft
Add breadcrumbItems to menuData for custom breadcrumb rendering#704kaevee wants to merge 1 commit intomoqui:masterfrom
kaevee wants to merge 1 commit intomoqui:masterfrom
Conversation
- read optional screenBreadcrumbItems from the context stack
- normalize each breadcrumb to {title, pathWithParams}
- allow fallback from pathWithParams to path
- ignore invalid or empty breadcrumb entries
- attach breadcrumbItems to the final menuData map for WebrootVue consumers
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.
Add breadcrumbItems to menuData for custom breadcrumb rendering
Problem
The header breadcrumb UI only had enough data to render the default path/title pattern. We need a way for screens to provide custom breadcrumb states and links.
Use Case
Some screens need custom breadcrumb trails (including intermediate links and non-link labels) that differ from default menu depth/title rendering, so users can navigate contextual paths correctly.
What Changed
screenBreadcrumbItemsfrom the context stack.title(required)pathWithParams(optional; falls back frompathWithParamstopathwhen available)breadcrumbItemsto the finalmenuDataentry returned for the current target screen.Data Contract
Input expected in context stack:
screenBreadcrumbItems: collection of mapstitle(string, required)pathWithParams(string, optional)path(string, optional fallback)Output added to menuData last entry:
breadcrumbItems: list of{ title, pathWithParams? }Backward Compatibility
screenBreadcrumbItemsis absent or empty, nobreadcrumbItemsare added.Validation
Manual checks:
screenBreadcrumbItemswith mixed linked/non-linked items and confirm output contains valid normalized entries.Out of Scope
Cannot read properties of undefined (reading 'catch')) is a separate pre-existing router shim issue.Reviewer Focus
breadcrumbItemsnaming/shape acceptable for long-term API compatibility?pathWithParams->path) appropriate?Related PR