[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

+26
View File
@@ -0,0 +1,26 @@
# Decomposition Todo
- [ ] Create `js/ui/profileModal/ProfileBlockListController.js`
- [ ] Import dependencies (`devLogger`, `userLogger`, `FALLBACK_PROFILE_AVATAR`).
- [ ] Implement `cacheDomReferences`.
- [ ] Implement `registerEventListeners`.
- [ ] Move `populateBlockedList` logic.
- [ ] Move `mutateBlocklist` logic.
- [ ] Move helper methods (`ensureBlockListStatusElement`, `setBlockListLoadingState`).
- [ ] Create `js/ui/profileModal/ProfileEditController.js`
- [ ] Import dependencies (`buildProfileMetadataEvent`, `buildPublicUrl`, `buildR2Key`).
- [ ] Implement `cacheDomReferences`.
- [ ] Implement `registerEventListeners`.
- [ ] Move `populateEditPane` logic.
- [ ] Move `handleSaveProfile` logic.
- [ ] Move `handleUpload` logic.
- [ ] Update `js/ui/profileModalController.js`
- [ ] Import new controllers.
- [ ] Instantiate in `constructor`.
- [ ] Call `cacheDomReferences` and `registerEventListeners`.
- [ ] Delegate method calls (wrappers or direct usage).
- [ ] Remove extracted code.
- [ ] Verification
- [ ] `npm run lint`
- [ ] `node scripts/run-targeted-tests.mjs tests/profile-modal-controller.test.mjs`
- [ ] Verify line count reduction.