33640 task create new decoupled breadcrumbservice #33650
Merged
+234
−1,027
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.
Proposed Changes
This pull request introduces a significant refactor and enhancement of the breadcrumb (crumbtrail) functionality in the dotCMS Angular UI. The main changes focus on improving how breadcrumbs are generated and managed, leveraging Angular signals for reactive state management, and making the breadcrumb logic more robust and maintainable. Additionally, there are supporting updates to navigation and router services to facilitate these improvements.
Breadcrumb and Navigation Enhancements:
DotCrumbtrailServiceto use Angular signals for managing breadcrumbs and history, and introduced a new computed property for generating the breadcrumb trail based on navigation history and menu items. The service now listens to both navigation events and manual breadcrumb additions, updating the breadcrumb state reactively. [1] [2] [3] [4]dot-crumbtrail.component.htmlto allow manual addition of breadcrumbs for demonstration or testing purposes.Navigation and Router Service Updates:
DotNavigationServiceto expose menu items and flattened menu items as signals, making it easier to compute and react to navigation changes throughout the application. [1] [2]DotRouterServiceto maintain a reactive navigation history using signals, appending new entries on navigation and exposing the history for consumption by other services like the crumbtrail. [1] [2]Other Changes:
These changes modernize the breadcrumb implementation, improve maintainability, and enable more advanced navigation features in the future.
This PR fixes: #33640