Skip to content

Conversation

@nicobytes
Copy link
Contributor

@nicobytes nicobytes commented Oct 23, 2025

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:

  • Refactored the DotCrumbtrailService to 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]
  • Added an "Add Breadcrumb" button to the dot-crumbtrail.component.html to allow manual addition of breadcrumbs for demonstration or testing purposes.

Navigation and Router Service Updates:

  • Enhanced the DotNavigationService to expose menu items and flattened menu items as signals, making it easier to compute and react to navigation changes throughout the application. [1] [2]
  • Updated the DotRouterService to 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:

  • Updated example configuration files to use local development URLs and a sample authentication token for easier local testing. [1] [2]
  • Minor comment additions in the global state interface to indicate areas related to breadcrumb and navigation state.

These changes modernize the breadcrumb implementation, improve maintainability, and enable more advanced navigation features in the future.

This PR fixes: #33640

- Introduced an "Add Breadcrumb" button in the dot-crumbtrail component template.
- Implemented `addBreadcrumb` method in the component to handle breadcrumb addition.
- Updated the service to manage breadcrumbs using signals for improved state management.

This enhancement allows users to dynamically add breadcrumb items, improving navigation flexibility.
…ithub.com:dotCMS/core into 33640-task-create-new-decoupled-breadcrumbservice
…tegrating GlobalStore in DotAppsConfigurationResolver
@nicobytes nicobytes merged commit 3c30e44 into 33565-q42025-proto-chrome-breadcrumb-tasks Oct 28, 2025
5 of 6 checks passed
@nicobytes nicobytes deleted the 33640-task-create-new-decoupled-breadcrumbservice branch October 28, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants