Skip to content

08 -- Fix Plan: Frontend Duplication & Naming Convention

Date: 2026-02-27 (updated) Scope: Razor file naming, duplicates, directory organization, migration tool alias generation


Current Status: ALL CRITICAL ITEMS DONE

Phase Status Detail
Phase 1: Critical Fixes DONE 4 data protection stubs removed, 3 files renamed, 1 duplicate removed (commit 65aace9)
Phase 2: Migration Tool DONE Path A/B duplicate prevention fixed (commit 8e384d6). Additional fixes: settings exclusion, ps-prefix stripping, DefaultGridEditorConverter (commits 09935d2, 164069f, 76a17cf)
Phase 3: Directory Organization DEFERRED Flat structure retained. Prefix-based naming provides sufficient organization.
Phase 4: Header Comments DONE 8 comments fixed (commit 65aace9)
Phase 5: API Keys DONE Mapbox token moved to appsettings.json under ProgressSettings:MapboxAccessToken. Google Maps key already externalized. (commit 321ae86)

What Was Done

Phase 1: Critical Fixes (commit 65aace9)

Data Protection Views (4 pairs): Content uses gridElement* (Path A) element type aliases. The grid_element_* (Path B) stubs were dead code. They were removed.

File Kept File Removed
gridElementPsdataprotectiondpo.cshtml grid_element_psdataprotectiondpo.cshtml
gridElementPsdataprotectionname.cshtml grid_element_psdataprotectionname.cshtml
gridElementPsdataprotectionsummarytable.cshtml grid_element_psdataprotectionsummarytable.cshtml
gridElementPsdataprotectionweare.cshtml grid_element_psdataprotectionweare.cshtml

Case-Sensitivity Fixes (2 files):

Old Name New Name
TrustpilotWidget.cshtml trustpilotWidget.cshtml
videoPopOut.cshtml videoPopout.cshtml

Naming Mismatch Fix (1 file):

Old Name New Name
gridelementloanboxescompletegrideditor.cshtml grid_element_loanboxescompletegrideditor.cshtml

True Duplicate Removed (1 file):

Kept Removed
grid_builtin_submenu.cshtml gridelementsubmenu.cshtml

Phase 2: Migration Tool Fixes (3 commits)

The root cause of Path A/B duplicates was fixed in the migration tool across three commits:

  1. 09935d2 -- Settings editor exclusion list, ps-prefix stripping in target DB lookup, case-insensitive SQL
  2. 164069f -- DefaultGridEditorConverter uses grid_element_ prefix, settings skip during content migration
  3. 76a17cf -- ps-prefix stripping in source DB lookup (FindSourceElementTypeForGridEditorAsync)

Fresh migration runs now produce ~430 element types (down from ~455).

Phase 4: Header Comments (commit 65aace9)

8 files had incorrect "Trustpilot Widget" header comments. All corrected to match the actual component name.

Phase 5: API Keys (commit 321ae86)

  • Mapbox token moved to appsettings.json under ProgressSettings:MapboxAccessToken
  • Google Maps key was already externalized

Decision: Flat Directory Structure Retained

The blockgrid/Components/ directory remains flat. Two options were evaluated:

  • Option A (subdirectories) required a custom IViewLocationExpander and would change how Umbraco resolves component views. Risk outweighed benefit.
  • Option B (prefix-based naming) uses the existing naming prefixes (grid_builtin_*, grid_element_*, gridElement*) to provide visual organization. No code changes needed.

Option B was chosen. The prefixes provide sufficient categorization for maintenance.


Reference: Original Problem Statement

The v17 blockgrid/Components/ directory had: - 4 inconsistent naming conventions (grid_element_*, grid_builtin_*, gridElement*, gridelement*) - 4 data protection file pairs where the wrong file was loaded at runtime - 1 true file duplicate - 2 case-sensitivity issues that would break on Linux deployment - 1 naming mismatch where element type alias did not match file name

All of these are now resolved.

Migration documentation by Double for Progress Credit Union