22541 consolidate static text breadcrumb route branches
This commit is contained in:
@@ -275,6 +275,36 @@ Follow-ups:
|
||||
|
||||
- Next slice recommendation: consider extracting a small, route-keyed breadcrumb branch map/helper grouping in `components/breadcrumbs.js` (purely structural) to reduce the long inline conditional chain while keeping one-slice behavior parity.
|
||||
|
||||
### CL-22541-J: breadcrumbs static text-only route crumb consolidation
|
||||
|
||||
date: 2026-04-09
|
||||
author: Cline
|
||||
scope: `components/breadcrumbs.js`
|
||||
type: change
|
||||
rationale: Continue the same bounded refactor cadence by consolidating repeated static text-only breadcrumb route branches into one route-label resolver.
|
||||
impact: Refactor-only structural deduplication/readability improvement; no intended route/auth/session/API/EN-CY/a11y behavior change.
|
||||
status: completed
|
||||
|
||||
Summary:
|
||||
|
||||
- Added `getStaticTextCrumbLabel(path)` in `components/breadcrumbs.js` to centralize static text-only crumb labels by pathname.
|
||||
- Replaced repeated single-line static crumb branches with one generic render path:
|
||||
- `renderTextCrumb(getStaticTextCrumbLabel(pathname))` when mapping returns a label.
|
||||
- Consolidated static branch handling for routes including:
|
||||
- account register
|
||||
- DNS index/help/contact/applications process pages
|
||||
- cookies/privacy/accessibility/static auth routes.
|
||||
- Preserved route labels (including translation keys and legacy hardcoded labels where already present).
|
||||
|
||||
Validation:
|
||||
|
||||
- `npx eslint components/breadcrumbs.js` -> pass.
|
||||
- `node tests/phase22/index.test.cjs` -> pass (combined suite).
|
||||
|
||||
Follow-ups:
|
||||
|
||||
- Next slice recommendation: extract a small grouped helper for recurring two-crumb route pairs (e.g., my-portal + section label, dns list + case reference) to reduce the remaining conditional chain while preserving explicit route behavior.
|
||||
|
||||
### CL-00X: 22500 `components/elements/index.js` Phase 1 helper extraction
|
||||
|
||||
date: 2026-04-07
|
||||
|
||||
Reference in New Issue
Block a user