mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 21:02:28 +00:00
[decompose] extract BlockList and EditProfile from ProfileModalController
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
40d72709c8
commit
bd6ca5b54e
8 files changed
+1047
-742
No files matched your search
@@ -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.
|
||||
Reference in new issue
Block a user