[decompose] extract BlockList and EditProfile from ProfileModalController

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-19 20:10:37 +00:00
1 parent 40d72709c8
commit bd6ca5b54e
8 files changed
+1047 -742

No files matched your search

@@ -0,0 +1,15 @@
# Decomposition Decisions
- **File:** `js/ui/profileModalController.js`
- **Extracted Controllers:**
- `js/ui/profileModal/ProfileBlockListController.js` (Block list logic)
- `js/ui/profileModal/ProfileEditController.js` (Edit profile logic)
- **Rationale:**
- Block list management is a distinct feature set (add, remove, list, refresh).
- Edit profile is a self-contained form handling workflow (populate, upload, save).
- Reducing the main controller size improves readability and separation of concerns.
- **Backwards Compatibility:**
- New controllers alias DOM references back to the main controller (`this.mainController.blockList = ...`) to maintain compatibility with tests and potentially other external code that expects these properties on the main controller.
- Delegate methods added to `ProfileModalController` to forward calls to the new controllers, preserving the public API.
- **Baseline Update:**
- `js/ui/profileModalController.js` reduced from 6258 to 5541 lines (-717 lines).