[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

+29
View File
@@ -0,0 +1,29 @@
# Decomposition Context
- **Task:** Decompose `js/ui/profileModalController.js` (6258 lines).
- **Reason:** Largest grandfathered file, highly coupled UI logic.
- **Goal:** Extract "Block List" and "Edit Profile" logic into separate controllers to reduce line count by >200 lines and improve maintainability.
- **Target Branch:** `unstable` (via `agents/daily/...` branch).
- **Plan:**
1. Extract `ProfileBlockListController` to manage blocked users list, add/remove blocks.
2. Extract `ProfileEditController` to manage profile editing form, uploads, and saving.
3. Update `ProfileModalController` to delegate to these new controllers.
## Selected Blocks
1. **Block List Management**:
- `populateBlockedList`
- `handleAddBlockedCreator`
- `handleRemoveBlockedCreator`
- `ensureBlockListStatusElement`
- `setBlockListLoadingState`
- `mutateBlocklist`
- Event listeners and DOM cache for block list elements.
2. **Edit Profile Management**:
- `handleEditProfile`
- `populateEditPane`
- `checkStorageForUploads`
- `handleUpload`
- `handleSaveProfile`
- Event listeners and DOM cache for edit profile elements.