Conversation
...s/dot-analytics/portlet/src/lib/dot-analytics-dashboard/dot-analytics-dashboard.component.ts
Outdated
Show resolved
Hide resolved
...s/dot-analytics/portlet/src/lib/dot-analytics-dashboard/dot-analytics-dashboard.component.ts
Outdated
Show resolved
Hide resolved
769cee9 to
043324c
Compare
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
core-web/libs/global-store/src/lib/features/breadcrumb/breadcrumb.feature.spec.ts
Outdated
Show resolved
Hide resolved
core-web/libs/global-store/src/lib/features/breadcrumb/breadcrumb.feature.spec.ts
Outdated
Show resolved
Hide resolved
core-web/libs/global-store/src/lib/features/breadcrumb/breadcrumb.feature.spec.ts
Show resolved
Hide resolved
...dot-analytics/portlet/src/lib/dot-analytics-dashboard/dot-analytics-dashboard.component.html
Outdated
Show resolved
Hide resolved
…mb management ### Summary - Introduced a new to manage dashboard tab configurations. - Updated breadcrumb logic to dynamically reflect the current tab using . - Refactored the dashboard component to utilize for rendering tab content, improving performance and maintainability. - Removed redundant breadcrumb setup from individual report components, centralizing breadcrumb management in the dashboard store. ### Changes - **dot-analytics-dashboard.store.ts**: Added logic to update breadcrumbs based on the current tab. - **dot-analytics-dashboard.component.ts**: Refactored tab rendering and removed individual breadcrumb logic from report components. - **dot-analytics-dashboard.component.html**: Updated tab panel structure for dynamic content loading. - **dot-analytics-conversions-report.component.ts** and **dot-analytics-engagement-report.component.ts**: Removed breadcrumb setup from component initialization. ### Motivation These changes streamline the dashboard's tab management and enhance user navigation by ensuring breadcrumbs accurately reflect the current context.
This comment was marked as resolved.
This comment was marked as resolved.
…nce breadcrumb tests
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
…ex checks ### Summary - Added validation to ensure breadcrumb count is accurate before adding a new breadcrumb. - Improved regex checks in breadcrumb utility to handle null or empty IDs more robustly. ### Changes - **breadcrumb.feature.spec.ts**: Added an expectation to verify the initial breadcrumb count. - **breadcrumb.utils.ts**: Enhanced the logic for checking item IDs against the regex to prevent false positives. ### Motivation These changes ensure that the breadcrumb functionality behaves as expected, improving the reliability of breadcrumb management in the application.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as off-topic.
This comment was marked as off-topic.
…dotCMS/core into 34694-fix-analytics-breadcrumbs
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
…ormalization comments
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
…readcrumbs function
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
Claude finished @adrianjm-dotCMS's task —— View job PR Review: Analytics Breadcrumb ManagementReviewing this PR for potential issues, edge cases, and design problems. Issues Found:1. Type Safety Vulnerability in
2. Potential State Corruption in Breadcrumb Feature (breadcrumb.feature.ts:164-168) if (lastBreadcrumb && shouldReplaceLastCrumb(item, lastBreadcrumb)) {
setLastBreadcrumb(item);
} else {
appendCrumb(item);
}If 3. Truncation Logic Bug (breadcrumb.feature.ts:250-252) if (result.index && result.index > -1) {
truncateBreadcrumbs(result.index);
}This condition if (result.index !== undefined && result.index > -1) {4. Missing Edge Case in URL Normalization (breadcrumb.feature.ts:139-146) 5. Session Storage Error Handling (breadcrumb.feature.ts:172-179) 6. Test Coverage Gap Architecture Concerns:7. Tight Coupling Between Analytics and Breadcrumb Logic 8. Rule Registration Pattern Missing Minor Issues:9. Inconsistent Error Handling Patterns 10. Magic String Dependencies |
This pull request introduces a robust mechanism for handling breadcrumb tab switching in the analytics dashboard, ensuring that tab transitions never accumulate redundant breadcrumbs and that tab crumbs persist correctly across reloads. The changes include a new rule-based system for deciding when to replace the last breadcrumb, updates to analytics report components to use feature-namespaced IDs, and enhancements to documentation and tests.
Breadcrumb tab switching and persistence improvements:
shouldReplaceLastCrumbinbreadcrumb.utils.tsthat determines whether the last breadcrumb should be replaced based on stable patterns (e.g., both items are analytics tabs or content-edit routes). This prevents accumulation of tab crumbs when switching between analytics tabs. [1] [2]analytics-engagement,analytics-conversions,analytics-pageview) when adding breadcrumbs, aligning them with the new rule system. [1] [2] [3]Testing and documentation updates:
shouldReplaceLastCrumbfunction, covering both content-edit and analytics tab rules, as well as edge cases.BREADCRUMBS.mdto explain the new rule-based replace behavior for tabs, how to add new rules, and best practices for sub-level and tab breadcrumbs. [1] [2] [3]UI improvements:
These changes collectively ensure that analytics tab breadcrumbs behave intuitively, are not duplicated, and persist reliably across navigation and reloads.
Screen.Recording.2026-03-09.at.2.53.44.PM.mov
This PR fixes: #34694
This PR fixes: #34694