Remove dead and debug-only code from elements index

This commit is contained in:
2026-04-08 08:23:51 +01:00
parent 6c387fa6fb
commit 8350e42d02
2 changed files with 31 additions and 88 deletions
+30
View File
@@ -3612,3 +3612,33 @@ Validation:
Follow-ups:
- Continue bounded no-behavior-change slices by extracting one additional low-risk wrapper (e.g., `CheckBoxfield`) or removing dead locals/debug logging in place.
---
### CL-102: 22500 `components/elements/index.js` dead/debug-only cleanup slice
date: 2026-04-08
author: Cline
scope: `components/elements/index.js`
type: change
rationale: Execute requested bounded cleanup slice by removing dead code and debug-only artifacts from the elements monolith without changing behavior.
impact: No intended behavior change; EN/CY and accessibility behavior preserved while reducing noise and unused code paths.
status: completed
Summary:
- Removed debug-only runtime log in `CheckBoxfield` (`console.log(props)`).
- Removed unused/dead locals and helpers inside `components/elements/index.js`, including:
- top-level unused imports (`axios`, `pickListLookup`, `setFileCount` action import, redux hooks import)
- unused local validators and helpers in wrappers (e.g., unused `required`/`postcode`/`normalizeDecimal` variants)
- unused placeholder constant `RenderCaseID`
- unused local fallbacks in `FileUploadField` (`uploadCount`, local `setFileCount`)
- Kept functional field wiring, labels/translations, and validation behavior in active render paths unchanged.
Validation:
- `npx eslint components/elements/index.js` -> pass
Follow-ups:
- Continue bounded no-behavior-change slices only (e.g., extract one additional low-risk wrapper such as `CheckBoxfield`).